473,791 Members | 3,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

url mapping works differently in Cassini than in IIS??

I've gotten url mapping to work perfectly while running in VS 2005 Cassini debug
mode.

I simply added this to web.config

<urlMappings enabled="true">
<add
url="~/school"
mappedUrl="~/Schools.aspx" />
</urlMappings>

and all calls to domain.com/school will map to domain.com/Schools.aspx

However, when I run this in IIS on an XP development box, or on IIS on a Windows
2003 Server box, I get page cannot be found.

I even tried creating a Global.aspx and adding

protected void Application_Beg inRequest(objec t sender, EventArgs e) {
string strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath. ToLower();
if (strCurrentPath .EndsWith(@"/school")) {
string strCustomPath = @"/Schools.aspx";
Context.Rewrite Path(strCustomP ath);
}
}

which worked perfectly in Cassini - but not in IIS on XP or 2003.

I'm perplexed. How can I get this to work?
--
Thanks in advance, Les Caudle
Sep 16 '06 #1
2 1789
Les Caudle wrote:
I even tried creating a Global.aspx and adding

protected void Application_Beg inRequest(objec t sender, EventArgs e) {
string strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath. ToLower();
if (strCurrentPath .EndsWith(@"/school")) {
string strCustomPath = @"/Schools.aspx";
Context.Rewrite Path(strCustomP ath);
}
}
Is the web.config and Global.aspx in the root directory of the site?

Both the web.config and this code look good to me.

You can insert a System.Diagnost ics.Trace.Write Line to see if this is
executing. You can use the sysinternals DbgView utility to see this
when running from IIS.

Sep 18 '06 #2
Yes, both web.config and global.aspx are in the root directory.

Apparently, Cassini works very differently from IIS.

With Casinni, having the code in either web.config or global.aspx works
perfectly. Cassini global.aspx Application_Beg inRequest also gets called
repeatedly for images, css, etc. of the web page displayed.

This does not happen in IIS. Application_Beg inRequest is only called once for
each page, and it never calls Application_Beg inRequest for
domainName.com/school.

So, my best guess is that neither global.aspx nor web.config is even getting a
crack at domainName.com/school. IIS may be eating it - which kind of conflicts
with the documents for urlMappings as I read them.

<urlMappings enabled="true">
<add
url="~/school"
mappedUrl="~/Schools.aspx" />
</urlMappings>

Thanks, Les Caudle
On 18 Sep 2006 06:38:52 -0700, "Eric" <en*********@ya hoo.comwrote:
>Les Caudle wrote:
>I even tried creating a Global.aspx and adding

protected void Application_Beg inRequest(objec t sender, EventArgs e) {
string strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath. ToLower();
if (strCurrentPath .EndsWith(@"/school")) {
string strCustomPath = @"/Schools.aspx";
Context.Rewrite Path(strCustomP ath);
}
}

Is the web.config and Global.aspx in the root directory of the site?

Both the web.config and this code look good to me.

You can insert a System.Diagnost ics.Trace.Write Line to see if this is
executing. You can use the sysinternals DbgView utility to see this
when running from IIS.
--
Thanks in advance, Les Caudle
Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4323
by: J. Muenchbourg | last post by:
I'm trying to install the Cassini WebServer on my Windows xp with .net framework, but the below instructions to get the webserver running after downloading the .exe doesnot make any sense at all: ------------ Instructions ------------ Go to the directory containing the above files (setup to use c# compiler and gacutil utility). Run 'build.bat', it will:
1
984
by: David | last post by:
I have searched the net and can not find a definitive statement about developing ASP apps under Cassini and XP Home. Can this be done successfully? I only have one test XP home machine and I can not load it with Cassini and vs.net. Thanks
5
2605
by: clintonG | last post by:
After discovering Cassini is crippleware I learned how to use Start Options to disable NTLM and enable support for the default web server on my XP Pro dev platform. Now all new projects are created as websites. I was happy until when out of the blue Cassini has re-enabled itself for one of the websites I am developing. Despite the Start Option settings I can't get rid of the Cassini pest and my website will not load from the IDE. Does...
5
1429
by: Randall Parker | last post by:
Running XP Home which does not come with IIS. In response to advice received on this forum I installed the Cassini web server to serve in place of IIS. See here for Cassini: http://www.asp.net/Projects/Cassini/Download/Default.aspx?tabindex=0&tabid=1 Trying to create an asp.net project in VS 2003. When I try to create the problem I get this error: "The default Web access mode for this project is set to file share, but the project...
13
1574
by: Chip | last post by:
I have a dual-threaded app that runs just as it's supposed to under Casini. However, when I run the exact same code undier IIS (ASP.NET 2.0) on the same machine, it is totally unpredictable and crashes the server. One would think my threading was the problem, but like I said, runs perfectly under Casini. Any ideas?
5
5306
by: NonNB | last post by:
Apols for the post here, but there is no public.inetserver.cassini Is there a way to configure the cassini / ASP NET Development web server: 1) So that the port can be pegged (seems to be random)? 2) So that can access the server using hostname other than localhost? I need to test some client side SOAP calls Thanks in advance
5
7701
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini webserver in VS2005 then everything is rosy. If I then set up the website on the local IIS 5.1 the site no longer connects and returns this error: An error has occurred while establishing a connection to the server. When connecting to SQL Server...
4
2946
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini 2.0 I locate my whole project in a folder named C:\website\GOWatch
6
2795
by: R.A.M. | last post by:
Hello, I have problem with IIS 5.1 - it ceased to function. So I downloaded and installed Cassini Web Server and uninstalled IIS in my Windows XP Professional. The problem is that I cannot successfully run Cassini. I entered application directory F:\Inetpub\wwwroot, server port 80, virtual root / and I pressed Start button. Then message box appers: Cassini Managed Web Server failed to start listening on port 80. Possible conflict with...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.