开发环境不同引发的映射路径不正确的问题

    因为项目开发的需要,我在我的机子上安装了两个版本的开发环境,vs2003和vs2005.本来事为了开发的时候方便,现在却出现不同的问题了.本来上午运行好好的项目,下午的时候在打开项目,出现错误:
"无法打开web项目“helloworld“。文件路径"c:\inetpub\wwwroot\helloworld"与URL"http://Localhost:/helloworld"不符。这两者需要映射到相同的服务器位置。HTTP错误404:Not   Foud  "
我并没有改动过项目的路径,出现这种情况感觉有点奇怪,于是去网上查了一下,有的朋友说是需要重新注册一下C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i,我按说明注册了一下,但是打开项目的时候还是提示那个映射路径的问题.后来还有朋友说删除"C:\Documents   and   Settings\Administrator\VSWebCache"目录下面的项目文件夹,我删除了一下,还是不行,最后经过一个朋友的提醒,我查看了一下应用程序的日志,日志中出现如下的提示错误"在同一 IIS 进程中不可能运行两个不同的 ASP.NET 版本。请使用 IIS 管理工具重新配置服务器以在一个单独的进程中运行应用程序。有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。"于是我修改了一下iis管理器里面asp.net的版本,把所有项目的版本统一了一下,在重新打开项目,问题解决了.
搞了一下午的东西,就这样搞定了,现在写出来供大家参考吧,这只是我自己的一个解决方法.

posted on 2007-11-02 10:11  Edwin dong  阅读(720)  评论(1编辑  收藏  举报

<% Function googleColor(value, random) Dim colorArray colorArray = Split(value, ",") googleColor = colorArray(random Mod (UBound(colorArray) + 1)) End Function Function googleScreenRes() Dim screenRes, delimiter, resArray screenRes = Request.ServerVariables("HTTP_UA_PIXELS") delimiter = "x" If IsEmpty(screenRes) Then screenRes = Request.ServerVariables("HTTP_X_UP_DEVCAP_SCREENPIXELS") delimiter = "," End If resArray = Split(screenRes, delimiter, 2) If (UBound(resArray) + 1) = 2 Then googleScreenRes = "&u_w=" & resArray(0) & "&u_h=" & resArray(1) End If End Function Function googleDcmguid() Dim dcmguid dcmguid = Request.ServerVariables("HTTP_X_DCMGUID") If Not IsEmpty(dcmguid) Then googleDcmguid = "&dcmguid=" & dcmguid End If End Function Dim googleTime, googleDt, googleScheme, googleHost googleTime = DateDiff("s", "01/01/1970 00:00:00", Now()) googleDt = (1000 * googleTime) + Round(1000 * (Timer - Int(Timer))) googleScheme = "http://" If StrComp(Request.ServerVariables("HTTPS"), "on") = 0 Then googleScheme = "https://" googleHost = Server.URLEncode(googleScheme & Request.ServerVariables("HTTP_HOST")) Dim googleAdUrl, googleAdOutput googleAdUrl = "http://pagead2.googlesyndication.com/pagead/ads?" &_ "ad_type=text_image" &_ "&channel=" &_ "&client=ca-mb-pub-6539345765131754" &_ "&dt=" & googleDt &_ "&format=mobile_single" &_ "&host=" & googleHost &_ "&ip=" & Server.URLEncode(Request.ServerVariables("REMOTE_ADDR")) &_ "&markup=xhtml" &_ "&oe=utf8" &_ "&output=xhtml" &_ "&ref=" & Server.URLEncode(Request.ServerVariables("HTTP_REFERER")) &_ "&url=" & googleHost & Server.URLEncode(Request.ServerVariables("URL")) &_ "&useragent=" & Server.URLEncode(Request.ServerVariables("HTTP_USER_AGENT")) &_ googleScreenRes() &_ googleDcmguid() Set googleAdOutput = Server.CreateObject("MSXML2.ServerXMLHTTP") googleAdOutput.Open "GET", googleAdUrl, false googleAdOutput.Send Response.Write(googleAdOutput.responseText) %>