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

Notification

Icon
Error

Directory Listing/Navigating to a Non-ASP Page in Cassini
Guest
#1 Posted : Tuesday, June 27, 2006 5:10:58 AM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

I'm using UltiDev Cassini to serve webpages as part of an application demo for salesmen in the field. The actual application uses IIS, but IIS cannot be guaranteed on the salesmen's laptops, and we want the smallest footprint possible. Also, an automated install is essential, as well as running multiple apps simltaneously. Thus far, UltiDev Cassini does a good job of accomplishing these goals.

In regular Cassini, navigating to a directory gives me a directory listing. I wonder if this is possible in UltiDev Cassini, which gives me this error when I try to browse to a directory:

Server Error in '/' Application.


The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested Url: /CampaignOffice


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

I'm using .NET 1.1 within Cassini since this portion of the demo requires 1.1 at this time. The reason I want to be able to browse directories is that the actual product code is all done and runs in IIS; I'm just porting stuff to Cassini for the demo for salesmen in the field. The app must be located at c:\dir1\dir2\app.aspx. In IIS, dir1 would be a virtual directory. For this demo, I tried making dir2 "Physical Location" in Cassini Explorer, and this works to a point. However, some urls have the format dir2/dir4/file.ext, and just eliminating the dir2 portion of the url does not work. I thought that perhaps since navigating to and browsing a directory does no work for me, directing to one with a url won't either, so maybe if I can fix browsing to a directory, I can get the rest to work.

Thank you.
Ultidev Team
#2 Posted : Tuesday, June 27, 2006 5:56:54 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!

Directory browsing was turned off in UltiDev version of Cassini as a security measure. Unfortunately you will not be able to use directory browsing.

The general suggested good practice is this: in most cases the difference between relative links behavior in IIS and Cassini is caused by user's (incorrect) assumption that the application will always run in a non-root virtual folder. The best way to verify if application's links are set correctly is to deploy your ASP.NET application in IIS root and see if links are working.

To work around your specific issue you could try a couple of things:
- Make "c:\dir1" your app's physical folder under Cassini, and launch the application using http://localhost:<port>/dir2/app.aspx. This will allow your application to reference upper-level folder in links if you need it.

- Update relative URLs in your app to make sure they don't go to levels above current application's location. For example, if you specified physical folder for your app as "c:\dir1\dir2", and you want page "c:\dir1\dir2\app.aspx" to have a link to a "c:\dir1\dir2\dir4\file.ext" file, then you should be able to use relative link like href='dir4/file.ext' or href='./dir4/file.ext'. If you use a link like href='/dir4/file.ext' with the leading forward slash - it may work in Cassini, but in IIS it will work if your app is in IIS root folder, because leading "/" means "from the root of the web server" and thus points to different places depending whether or not your app is in the root (as it's usually in Cassini) or not (as it's usually in IIS).

Best regards,
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.