views:

419

answers:

1

i created an asp.net project in sharpdevelop. i wanted to get started to see how debugging is and i am stuck already. How do i run the ASP.NET project? It just says its configured as a DLL. How do i launch it as a webpage. I see "start browser in url" but how do i get my code in a webpage or what do i use to do it? Also can i debug while doing so like i would in MSVS?

+3  A: 

SharpDevelop does not have great ASP.NET support. It does not have a visual web forms designer, for example. If you need that I suggest you look at using Microsoft's Visual Web Developer Express Edition.

To be able to run, view and debug your ASP.NET web project with SharpDevelop you can use the Cassini personal web server. There is a closed source version of Cassini from UltiDev which I have not used. There is also an open source version of Cassini for .NET 3.5 which I have used. The open source version does need you to compile it from source however.

Once you have Cassini compiled you can do one of the following to debug your ASP.NET web project in SharpDevelop:

1) In the project options (Debug tab) choose Start External Program and then browse to the Cassini executable.

In the Command line arguments field specify the command line arguments for Cassini, for example:

d:\Projects\MyAspNetProject 8080 /

(The first parameter should be the folder containing your web.config and Default.aspx web page. The second parameter is the port number that Cassini will listen on. The third parameter is the virtual root to use.)

Save these project options and then when you select Debug | Run or press F5 you should be able to run and debug your ASP.NET project.

2) Alternatively you can start Cassini manually, with the command line arguments as described above, and leave it running in the background.

Then in the project options select Start Browser in URL and enter the URL for Cassini, for example:

http://localhost:8080/
Matt Ward
I could get Cassini running my project but when i press F5 it says i should set the prj to 32 bits... it is set to 32 by default. But anyways if i launch Cassini.exe from sharpdevelop would i not be able to debug and step through code? it sounds like i cant? cassini isnt running from F5 ATM.
acidzombie24
Can you provide more information about your setup? Such as SharpDevelop version, Cassini version and Windows version.Then some more information about the ASP.NET project you are using.I used the open source version of Cassini, a recent version of SharpDevelop, such as 3.2, installed on a clean machine, created a new ASP.NET project from the SharpDevelop template and then following the steps posted in the answer above I was able to run and debug the project. Can you try the same thing where you create a new project from a SharpDevelop template if you are not doing it already?
Matt Ward
wow, i tried it again and it worked. Instead of using Cassini i got from DLing elmah i went to the site you linked and built from there. Then it didnt work because of a 64bit issue (i know i asked about it soomewhere) and remembered i didnt specific x86. I rebuilt it again and now able to debug in sharpdevelop and step through code with no problems. Thanks :)
acidzombie24