您的位置:首页 > 其它

VS2003升级到VS2008(.net 1.1升级到.net3.5)及在Vista下调试等问题

2009-06-19 15:21 218 查看
Asp.net1.1升级到asp.net2.0需要升级的web.config配置文件

%systemroot%"system32"inetsrv"APPCMD.EXE migrate config "Default Web Site/"

在Vista下需要以管理员身份启动Cmd.exe才可以正常执行此命令

com.eLong.Common.ApplicationConfiguration.OnApplicationStart(Context.Server.MapPath( Context.Request.ApplicationPath ));需要修改目前直接运行Context.Request.ApplicationPath并不管用。
如何在升级vs2003的工程后在VS2008下调试系统

答:a.将站点的应用程序池设置为Classic .Net AppPool;b.将站点的身份验证中的Windows身份验证、基本身份验证、匿名身份验证都打开。

酒店DateTime格式字符串发生了变化。
注意在站点的设置中需要选择经典的.NET应用程序池,否则调试出问题(是否和配置文件的System.Web和System.WebServer有关)
编译Solution:HomePage 出现如下的Error 86 'MasterPage' is an ambiguous reference between 'System.Web.UI.MasterPage' and 'com.eLong.Common.UI.MasterPage' F:"Yyy"艺龙工作"网站0802上线_白雪版"src"Branch of webII"Assembly"com.eLong.Web.HomePage"container.aspx.cs 37 13 com.eLong.Web.HomePage

答:需要将MasterPage进行一直显示的定义后进行编译。

分析器错误信息: 在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。如果在 IIS 中没有将虚拟目录配置为应用程序,则可能导致此错误。

答: 解决办法将虚拟目录转换为应用程序,将Default AppPool换成Classic .Net AppPool。否则会出现如下的错误

com.eLong.Common.ApplicationConfiguration.OnApplicationStart(Context.Server.MapPath( Context.Request.ApplicationPath ));在上下文中将不可用。

com.eLong.Web.HomePage测试通过
com.eLong.Web.Hotel:升级出现的问题
酒店日期格式导致的问题:

需要在代码中将日期格式显示的定义出来不要用默认的DateTime方法的ToShortDateString之类的方法,要用DateTime.ToString (String Format) 方法显示的定义日期的输出格式。否则在不同语言版本的.NET Framework或者不同版本的.NET Framework上运行存在格式不兼容的隐患。

从Cookie中取出存储个日期格式及酒店名称等代码需要重新调整。

http://localhost/com.eLong.Web.Secure/creditcardpage.aspx?From=flight&CardNo=WUSRA"&Lang=cn&LoginType=W&Epos=f&MoneyText=1050&HeaderType=2&mem_name=&NextUrl=http%3a%2f%2fwww.elong.com%2fflights%2ffinish.aspx%3frn%3d0.9178150027759557&HostName=www.elong.com&IsHaveFlight=True&BusinessType=0&fee=1050&pFaxOrEmail=0&pkeys=bb%2cb%2caaa
将工程对应的.NET Framework版本改为.NET Framework3.5

升级后的文件增加了如下的2段节点:
在节点 <ItemGroup>中增加了

<Reference Include="System.Core">

<RequiredTargetFramework>3.5</RequiredTargetFramework>

</Reference>

在节点 <PropertyGroup>中增加了

<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

<PublishUrl>publish"</PublishUrl>

<Install>true</Install>

<InstallFrom>Disk</InstallFrom>

<UpdateEnabled>false</UpdateEnabled>

<UpdateMode>Foreground</UpdateMode>

<UpdateInterval>7</UpdateInterval>

<UpdateIntervalUnits>Days</UpdateIntervalUnits>

<UpdatePeriodically>false</UpdatePeriodically>

<UpdateRequired>false</UpdateRequired>

<MapFileExtensions>true</MapFileExtensions>

<ApplicationRevision>0</ApplicationRevision>

<ApplicationVersion>1.0.0.%2a</ApplicationVersion>

<IsWebBootstrapper>false</IsWebBootstrapper>

<UseApplicationTrust>false</UseApplicationTrust>

<BootstrapperEnabled>true</BootstrapperEnabled>

编译MessageGenerator.sln-工程com.eLong.Message.Test.csproj出现如下的错误

Error 355 The type or namespace name 'eLong' does not exist in the namespace 'com.eLong.Message.MsgTest.com' (are you missing an assembly reference?) F:"Yyy"艺龙工作"网站0802上线_白雪版"src"Branch of webII"Assembly"com.eLong.Message.MsgTest"Start.cs 229 37 com.eLong.Message.MsgTest

com.eLong.Message.MsgTest.CallProcessor.MessageService()修改为com.elong.travel.MessageService

记录每个solution如何打包-也就是打包到什么地方,如何部署
打包:仅打包成bin下的文件其他不做修改
有几个包?Web.rar;secure.rar;corp.elong.com;data.elong.com
进行Release编译-机票、酒店接最新的dll测试
如果在Vista中启动VS2008请以管理员权限启动否则加载WebApplication会出现

System.Runtime.InteropServices.ComException

升级的问题:

usercontrol替换为htmlcontrol的方式,Html控件与UserControl控件

页头增加如下一个开关EnableEventValidation="false
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: