Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Configuring Visual Studio 2003 debugging
Agust
#1 Posted : Friday, August 25, 2006 1:37:50 AM(UTC)
Groups: Member
Joined: 8/25/2006(UTC)
Posts: 6

Hi!
I am new to Cassini. Thank you for the product - looks grate - fast and simple to use.

I tried following the instructions to enable me to debug and run my current webprojects under Cassini - for a reason not specified here I need to run all my development under something else than IIS.
1. My web application runs fine when started with the correct path: http://localhost:1222/abcstarfandi.asmx
2. After following the basic instructions I saw that when I start my project in VS.NET my page is started with the wrong port number - resulting in an error understandably.
3. I am now trying to configure VS.NET debugging properties to tell cassini to use the right port. How do I do that? I am looking at the console help and came up with this:
UltiDevCassinWebServ
er.exe /run C:\Inetpub\wwwroot\ABC_BaseService abcstarfandi.asmx 1222
This does not work when I try it using the comand prompt console, the error I get is:
---
C:\Program Files\UltiDev\Cassini Web Server for ASP.NET 1.1>UltiDevCassinWebServ
er.exe /run C:\Inetpub\wwwroot\ABC_BaseService abcstarfandi.asmx 1222
UltiDev Cassini is serving ASP.NET 1.1 application
from "C:\Inetpub\wwwroot\ABC_BaseService"
at port 1222.
System.Net.Sockets.SocketException: Only one usage of each socket address (proto
col/network address/port) is normally permitted

Server stack trace:
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Cassini.Host.Start()
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(M
ethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInC
ontext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
sage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at Cassini.Host.Start()
at Cassini.Server.Start()
at CassiniService.Service1.RunStandaloneApp(String physicalPath, Int32 port,
String defaultDocument, String browser, Boolean showBrowser)
at CassiniService.Service1.RunStandaloneApp()
at CassiniService.Service1.RunAsConsole(String[] args)

Press Enter to exit...
---

Any hints?
Ultidev Team
#2 Posted : Friday, August 25, 2006 4:45:15 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Agust! Thank you for trying our Cassini!

It's something not very obvious, but Cassini server you run from Debug session doesn't use data from Cassini metabase file - the place where configuration data go when you use Cassini Explorer or register your application with Cassini programmatically. In other words, Cassini the service and Cassini the stand-alone process know nothing about each other. This in turn means that running an application under Cassini in Debugger on the same port as Cassini the service will result in the error you see - an attemp by stand-alone Cassini to use TCP port already used by Cassini service.

If you were running Debug session as shown below - with only two parameters: /run and application folder path (without specifying port number), then you should be fine because Cassini will pick a free port and run your application on it. You mentioned that it didn't work. If you could provide more information on the nature of that error, we should be able to help with resolving the issue.



Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Agust
#3 Posted : Friday, August 25, 2006 5:04:21 AM(UTC)
Groups: Member
Joined: 8/25/2006(UTC)
Posts: 6

Hello, thank you for a good response and a good explaination.

Here is the error I get when following the instructions on VS.NET 2003 debugging with Cassini


HTTP Error 403 - Forbidden.

Thank you, Ágúst V.
Guest
#4 Posted : Friday, August 25, 2006 5:20:36 AM(UTC)
Groups:

Message was deleted by a User.
Ultidev Team
#5 Posted : Friday, August 25, 2006 5:21:58 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Agust.

Please try specifying start document, like WebForm1.aspx, as the third parameter in the command line after /run and <app folder>. If your application has Default.aspx file, then it should have started even without specifying the default document, and it's a bug if it didn't. If you application does not have Default.aspx, then this behavior is expected as Cassini thinks it was asked to list files in the folder - the cation that is rightfully forbidden. Please let us know if your app has default.aspx, and whether this suggestion made any difference.

All the best,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Agust
#6 Posted : Friday, August 25, 2006 5:59:07 AM(UTC)
Groups: Member
Joined: 8/25/2006(UTC)
Posts: 6

I had already specified a start document - still the same error. After trying what you suggested in your last post with no result I decided it was time to restart the computer - and whola - now it works :-) I do specify as starting document like this:
/run C:\Inetpub\wwwroot\ABC_BaseService ABCStarfandi.asmx

I have not tried removing the startupdocument yet ...

Thanks for your help, Ágúst V.
Ultidev Team
#7 Posted : Friday, August 25, 2006 6:05:27 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Thanks, Ágúst.
We are glad it worked eventually. Removing the start document parameter will only work if your application has Default.aspx. Otherwise you should see good old Forbidden message.

Cheers,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.