0
Posted on 6:59 AM by Softminer and filed under ,

On Server side:


the most important is that the compiled version should be in "Debug" mode because the released version doesnt have the debugging information.

you have to install the "Visual Studio 2008 Service Pack 1 Remote Debugger".

you can download "Visual Studio 2008 Service Pack 1 Remote Debugger" from here

once you have installed it, run the service with "Local Account" authentication. and then run the debugger "rdbgwiz.exe" and allow the users on the domian to connect to the debugger remotly.

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\rdbgwiz.exe

afterward run "MSVSSMON.EXE" as Administrator. otherwise you can not debug "w3wp.exe"

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe

On Developer side:



On Developer side where visual studio is intalled you need to open web Solution with visual studio 2008 and go to Menu debug and attach to debugger and then giving pc name and then connect to w3w.exe
You have to open the project otherwise the debug menu will not show up.


To attach to a running ASP.NET application, you have to know the name of the ASP.NET process:

If you are running IIS 6.0 or IIS 7.0, the name is w3wp.exe.

If you are running an earlier version of IIS, the name is aspnet_wp.exe.

For applications built by using Visual Studio 2005 or later versions, the ASP.NET code can reside on the file system and run under the test server WebDev.WebServer.exe. In that case, you must attach to WebDev.WebServer.exe instead of the ASP.NET process. This scenario applies only to local debugging.
0
Posted on 6:38 AM by Softminer and filed under

there are two ways to return an image in asp.net as response , I tested both and the first 1 is much faster.

the first one is to use the Stream:


            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://www.yourwebsite.com/image.jpg");
            request.Timeout = 5000;
            request.ReadWriteTimeout = 20000;
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            System.Drawing.Image img = System.Drawing.Image.FromStream(response.GetResponseStream());
            img.Save(Response.OutputStream, ImageFormat.Jpeg);
            img.Dispose();

the second one is to use binary:

        WebRequest request = WebRequest.Create("http://www.yoursite.com/image.jpg");
        request.Credentials = CredentialCache.DefaultCredentials;
        HttpWebResponse   resp = (HttpWebResponse)request.GetResponse();
        Stream dataStream = resp.GetResponseStream();
        Response.Clear();
        Response.ContentType = resp.ContentType;
        BinaryReader reader = new BinaryReader(dataStream);
        Response.BinaryWrite(reader.ReadBytes(Convert.ToInt32( resp.ContentLength)));
        Response.Flush();
        reader.Close();
        dataStream.Close();
        resp.Close();

and you can access the both by using
<img src="http://localhost/WebSite/yourpage.aspx" />

PS: you can also write a handler which return back the image as output Response:

<%@ WebHandler Language="C#" Class="Handler" %>


using System;
using System.Web;
public class Handler : IHttpHandler {
    public void ProcessRequest(HttpContext context)
    {
            System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(path);
            request.Timeout = 5000;
            request.ReadWriteTimeout = 20000;
            System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
            System.Drawing.Image img = System.Drawing.Image.FromStream(response.GetResponseStream());
            img.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
            img.Dispose();
    }
    public bool IsReusable {
        get {
            return true;
        }
    }
}
0
Posted on 8:10 AM by Softminer and filed under

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

version 8 -> SQl 2000
version 9 -> SQl 2005
version 10 -> SQl 2008

when you connect through your MSSM (Microsoft Sql Server Management Studio) you can find your SQL version like following photo:

0
Posted on 7:41 AM by Softminer and filed under

1. How to enable the file sending in Skype:


to enable the file sending in Skype:

go to registary ( cmd -> regedit )

http://hkey_local_machine/SOFTWARE/Policies/Skype/Phone

DisableFileTransfer = 0

2. Run another instance of Skype:

go to "C:\Program Files\Skype\Phone\Skype.exe" (where you installed skype)

right click on skype and create a shortcut on desktop

then right click on shortcut and add "/secondary"

"C:\Program Files\Skype\Phone\Skype.exe" /secondary
0
Posted on 1:52 AM by Softminer and filed under ,

Here I wanna introduce some Virtual CD

DAEMON Tools
the free version is called Deamon light which is available here

MagicISO Virtual CD/DVD-ROM
the advantage of MagicISO is that you dont need to restart windows after installation

Alcohol 120%
Alcohol 120%, is a powerful Windows CD and DVD burning software that makes it easy to create backups of DVDs and CDs.
0
Posted on 1:49 AM by Softminer and filed under , , ,

Obfuscated code is source or machine code that has been made difficult to understand.

in other words its a way to encode the source code that would not be easy to decode. there is a famous free tool called .NET reflector which give the possibility to open compiled DLL or even EXE files of .NET project and see the source code.

to avoid this we have to obfuscate the source code.

Eazfuscator.NET
Eazfuscator.NET is a free obfuscator for .NET platform. The main purpose of obfuscator is to protect intellectual property of the software.

Skater .NET obfuscator
Skater .NET obfuscator is designed for both (x86 and x64) operating system platforms.

.NET Reactor
.NET Reactor is a powerful .NET code protection & licensing system which assists developers in protecting their .NET software.


for more discussion visit here
0
Posted on 2:26 AM by Softminer and filed under

I got this error on lanuching IIS 7.5

IIS Error: The process cannot access the file because it is being used by another process.

the problem was skype which was using port 80

with "netstat –ano" its possible to see the PID and the binded ports:

TCP 0.0.0.0:42 0.0.0.0:0 LISTENING 3540
TCP 0.0.0.0:53 0.0.0.0:0 LISTENING 1460
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 1336
TCP 0.0.0.0:81 0.0.0.0:0 LISTENING 3792
TCP 0.0.0.0:82 0.0.0.0:0 LISTENING 3792
TCP 0.0.0.0:88 0.0.0.0:0 LISTENING 452

then in TaskManager you can find the PID of the corresponding application:


Error in event Viewer:

System log Event: 1004 Source: IIS-W3SVC Error received when trying to start the stopped web site:

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0×80070020)

To verify nothing else is using the x.x.x.x:80 IP address and port (which would be a different issue), launch administrative command prompt and type: