.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Problems with url rewriting when using the ASP.NET development server

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
I've inherited a website which has been developed for IIS server. The hyperlinks in this website have a href attribute with the human readable form that appears in the url in the browser's searchbar. In Application_BeginRequest(), there is a method which will convert this into the acutal location of the page within the website's file structure.This works fine when running the website on IIS. However, when I am using the ASP.NET development server, the links do not work and I get a page not found error.I have noticed that Application_BeginRequest() is never called for the links when run using the ASP.NET development server. I have read that the ASP.NET development server will not serve pages that are outside of the application scope (http://msdn.microsoft.com/en-us/library/58wxa9w5%28VS.80%29.aspx), as the human-readable urls would appear to be when first processed by the server.Bear in mind that the urls in the aspx files are in human readable form, so I can't just use ResolveUrl(), because they don't correspond to files in the internal file structure until they have been re-written.I want to get the website running on the ASP.NET development server so that I can test it locally on my machine, which I can't really do if I can't get the url re-writing to work. Is there a way around this problem?

View Complete Post

More Related Resource Links

SQL Server 2008 Development problems with Visual Studio 2010 Ultimate uninstall and VS2010 premium i


I installed VS2010 Ultimate to test it out but had license for the VS2010 premium only.  After uninstalling ultimate and reinstalling VS2010 premium, my SQL Server 2008 now refuses to connect to my databases stating: 

TITLE: Connect to Server

Cannot connect to Q9300\SQL200801.


Page not found using ASP.NET Development server


Hi to all forum members

I got this problem. When I try to run a test project I receive "Page not found" in browser opened by ASP.NET Development server. I am logged as administrator to my WIN XP. And I am using VS2005. I had VWD and ASP.NET 2.0 before but  removed everything before installing VS2005. Do you hav eany idea why is this happening.

p.s. I do not use any firewall only nod32 as antivirus program

I will be very glad is someone can help me.

HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Agile Development: Extend Team Foundation Server To Enable Continuous Integration


How does Visual Studio 2005 Team System and Team Foundation Server facilitate the process of agile development and continuous integration? Here Ben Waldron explains it all.

Ben Waldron

MSDN Magazine March 2006

SQL Server 2000: New XML Features Streamline Web-centric App Development


With XML support in SQL Server 2000, you can query SQL over HTTP with a URL, bring the data down to the browser, and manipulate it on the client machine. By adding Internet Explorer 5.0 to the mix and using XSL to convert the XML to HTML, you can lighten the load on your database server. Going still one step further, by using Vector Markup Language you can even create drawings on the fly using the data from your SQL queries. This article illustrates this combination of technologies by leading you through the creation of a Web app that queries a digitized street map database that's been imported into a SQL Server database, sorts and displays the data using XML, and draws maps using VML.

Joshua Trupin

MSDN Magazine March 2000

ASP Development Server doesn't appear to execute JQuery?


Experienced a really strange problem today. I added a jquery script to my MVC application to collapse sections of a View (via divs).

Pretty standard stuff, he showed me the script working before hand and it works.

However any time I would run my MVC app via Visual Studio the script would not work. I changed browsers, re-imported the code from source control and basically me and my co-worker banged our heads together for some time trying to figure out why the exact same code was running different on two machines.

Publishing the MVC app to our web server and running worked for both machines but for some bizarre reason when I ran it on my VS it never did.

One thought that came to mind is that by VS uses the cassini default lightweight webserver for debugging, whereas my co-worker is using IIS.

This seems to suggest then that the ASP Development server does not support JQuery. Is this true and if not, what could the problem be?

Search Customization and Development Options in SharePoint Server 2007

Examine the powerful platform of SharePoint Server 2007 search for the end user and developer. Learn about the built-in Web Parts for search and writing search queries for your applications.

Problems building 32-bit .NETapplication that uses 64-bit COM server

I have a .NET application that uses a 3rd party 32bit DLL, so I need to build it using the x86 platform instead of 'Any CPU'. I also have a 64bit out-of-proc COM server that I reference the EXE directly in the project.  The project builds fine for 'Any CPU' but can't run on 64bit Windows because of the 32-bit dll.  This is expected.  But when I specify 'x86' the build fails and I get: TlbImp : error TI0000: A single valid machine type compatible with the input type library must be specified. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3283: Cannot find wrapper assembly for type library "Engine_ATLServiceLib". Basically this tells me that it failed to build the Interop Dll for the COM server object.  First off I am puzzled that I get this message when a platform is specified, I would've expected this when I build for 'Any CPU'.  That aside, I am thinking the TlbImp needs a '/Win32' or something, but I can't see how to do this in the IDE based on the platform.  Furthermore I am wondering if the marshalling in said Interop dll will be correct when the 32bit managed code talks with the 64bit COM object. Does anybody know what to do here?

Problems migrating 32-bit SQCLR routine to 64-bit SQL Server

Greetings. I have written a 32-bit SQLCLR routine that uses the 10.2g Oracle.DataAccess library to draw Oracle data through SQLServer queries. (This tool was necessary due to issues we had with the Oracle native client). This has been in place and working without issue for about two years. This tool required the independent registration of about six (?) other system assemblies, which worked without incident (various warnings about using unsupported assemblies aside). We use permission_set = unsafe for all these DLL's. We are now in the process of migrating this tool to the newer 64-bit version of SQL Server 2008 on our Windows 2008 Server R2, and we have a problem. We took our list of base assemblies from the 32-bit installation and registered them against the Framework64 version of the same DLL's on the SQL Server 2008 box, and that step worked. We found that the Oracle.DataAccess library we had could not be registered in the 64-bit SQL Server because it was an x86-specific version. We then discovered that the 64-bit version of the Oracle.DataAccess library was available only in the update patchset, which we obtained and installed. Unfortunately, adding the assembly now fails: When I attempt the CreateAssembly on the 64-bit Oracle.DataAccess.dll within the 64-bit instance of SQL Server, I now receive a new error, to-wit: "Assembly '

Having problems installing/setting up SQL Server 2008 Express/R2 for ASP.NET user management on deve

I'm a bit new to installing and configuring, well, just about anything regarding databases, so please bear with me. I'm currently building a couple of ASP.NET MVC 2 sites.  I'm following along with the MVCMusicStore tutorial, and am trying to set up user management using ASP.NET's configuration tool.  The problem is that ASP.NET can't 'see' the database. I have SQL Server 2008 installed on my laptop.  It's the version which is available on the Web Platform Installer (I believe it's Express).  When I try running the aspnet_sqlreg.exe program to set up my user management database, it can't tell that I'm running any version of SQL Server at all.  I get an exception about 'named pipes', and some other things I don't understand at the moment. Obviously, this is all a bit over my head.  Is there an idiot proof guide or tutorial available that describes, step-by-step, how to: 1. Install SQL Server 2008 on a development PC 2. How to configure it to be used by Visual Studio 2010 Professional 3. How to properly upload/modify the db on the production server with what's on the development PC Essentially, all the things that the ASP.NET tutorials gloss over.  Any suggestions, links to documentation, or other nudges in the right direction would be immensely appreciated.

problems with using SQLEXPRESS database on a server

I made an application that reads a KML file every few minutes and puts the data in a SQLEXPRESS database. It works perfectly on my laptop, but when I move everything to the server where it has to run, the application doesn't find the database anymore. I tried lots of connectionstrings already, but none works. I have to admit that my knowledge of connectionstrings is not that big, so I think the answer will be very simple. In my program I point to the app.config file who looks like this atm (remember, I changed the connectionstring a couple of times already, and I have no idea anymore where I started): <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings> <add name="ships" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inetpub\ftproot\eu006202\www.ortelius.icso.be\AIS\ships.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/> </connectionStrings> </configuration> I pasted the error I get on http://www.webbouwers.be/error.png Any idea what I need to do to get it work? Thank you in advance, L.

Problems using links in Visual Studio development

I've recently inherited a website which has two versions, one which runs on IIS and one which runs in the Visual Studio development environment, and there are a few differences in the way the website runs on the two of them which I'm confused about.The relevant code files for the IIS server version are kept under wwwroot, and I can open the website in Visual Studio and it works fine.However, there is a local development environment version of the website, which contains a copy of the same folders, and additionally a solution file. However, there are a number of problems with this version of the website, despite the fact the code is the same. Firstly, none of the images specified in the html tags are displayed correctly, even though I have checked that the images are in the project's directory in the location specified by the image's src attribute, just like they are in the IIS server version.The other problem is that none of the links work. I've noticed that for both the IIS server version of the website and the fileserver version, when the website first loads it calls Application_BeginRequest() in Global.asax.However, when the links are subsequently clicked, it only calls Application_BeginRequest() in the IIS server version -the fileserver version does not call this and just gives a 404 page not found error.I'm new to web development, so I'm not sur

Unable to connect to the ASP.NET Development Server

 I have VS 2008 with SP1 installed on Win XP. I have .NET 3.5 with SP1 installed When I ran and opened an existing project for the first time, I got the below error WebDev.WebServer.exe has encountered a problem and needs to close. After this error, I continusly get  "Unable to connect to the ASP.NET Development Server." whenever I run the website. I checked the internet and ASP.NET forum and tried all the following Making port numbers auto assign Making it to a specific port number using the Custom web server Tried creating new web site and checking Replaced WebDev.WebServer.EXE after downloading it from a website My anti virus have not blocked any websites as such I tried resetting VS settings by running devenv /resetsettings Can any one help me, what else might be the problem? Thanks in advance

why can't i run silverlight w/ wcf in iis but VS2010 built-in ASP.Net development server?

 Both VS200 and IIS are in my local machine. Suppose they have the same permission. I create a silverlight4 w/ wcf ria service project. The project runs well in VS2010 built-in ASP.Net development server. It doesn't work well after i publish it to IIS. I only can see its static content but not the .svc. i try to browse the .svc, it always show HTTP 500 error. I doubt if i do not open the asp.net runtime setting sth in IIS? Thanks!

I am getting some problems to install the sql server ....Plz help me,....

System Configuration Check - WMI Service Requirement (Success)  Messages  * WMI Service Requirement    * Check Passed   - MSXML Requirement (Success)  Messages  * MSXML Requirement    * Check Passed   - Operating System Minimum Level Requirement (Success)  Messages  * Operating System Minimum Level Requirement    * Check Passed   - Operating System Service Pack Level Requirement. (Success)  Messages  * Operating System Service Pack Level Requirement.    * Check Passed   - SQL Server Edition Operating System Compatibility (Success)  Messages  * SQL Server Edition Operating System Compatibility    * Check Passed   - Minimum Hardware Requirement (Success)  Messages  * Minimum Hardware Requirement    * Check Passed   - IIS Feature Requirement (Success)  Messages  * IIS Feature Requirement    * Check Passed   - Pending Reboot Requirement (Success)  Messages  * Pending Reboot Requirement    * Check Passed   - Performance Monitor Counter Requirement (Success)  Messages  * Performance Monitor Counter Requirement    * Check Passed   - Default Installation Path Permission Requirement (Success)  Messages  * Default Installation Path Permission Requirement &n

SQL Reporting Server connection problems?

I tried setting up SQL Server Reporting Services (per TFS Guide) and having issues connecting to the server. When i try to go to : http://MyyServer/Reports I get following error:   User 'MyServer\Admin' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed. When i try to go to: Http://MyServer/ReportServer i get the folowing error: The permissions granted to user 'MyServer\Admin' are insufficient for performing this operation. (rsAccessDenied)  I get a login dialog when i try to connect and i always use the machine admin/SQL Server sysadmin account I have of course searched on this problem and found a variety of blogs but none of them have resolved my problem. For example i tried to run IE in admin privileges and i still get the same error. I've try to uninstall/reinstall (even deleted sql server directories to make sure there was no cruft left over) and it didn't help. I don't know exactly how the http connections to reporting server happen but i tried to go into IIS expecting some reporting services virtual folders or something like that and i don't see anything. 

Problems with linked server to Analysis Services (SQL 2008)

I have problem with creating linked server from SQL database to Analsis services. BOth services are running on same machine. Operating system is Windows 2008. I create linked server (I use windows authentication and I am administrator on AS):  EXEC sp_addlinkedserver @server= 'OLAP_PRETOKI', @srvproduct = '', @provider='MSOLAP', @datasrc='localhost', @catalog='DWDatabase'  But when I try to test connection I get error (in the event log) and in the error log/dump I get this: 2010-09-03 13:48:28.41 Server Error: 17310, Severity: 20, State: 1. 2010-09-03 13:48:28.41 Server A user request from the session with SPID 57 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory. 2010-09-03 13:48:32.53 spid58 Open of fault log C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\log\exception.log failed. 2010-09-03 13:48:32.65 spid58 Using 'dbghelp.dll' version '4.0.5' 2010-09-03 13:48:32.66 spid58 SqlDumpExceptionHandler: Process 58 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. 2010-09-03 13:48:32.66 spid58 * ******************************************************************************* 2010-09-03 13:48:32.66 spid58 * 2010-09-03 13:48:32.66 spid58 * BEGIN STACK DUMP: 2010-09-03 13:4
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend