当写的链接数据库的代码在XBAP应用程序里面访问数据库的时候,会抛出一个权限什么的错误.后来照着网上一位仁兄的办法,更改了项目的文件.

Create a WinFx Web Browser Application
Close the solution
Open the CSPROJ file in a text editor
Set "HostInBrowser" to false
Set "Install" to true
Delete the tags: "StartAction", "StartProgram", "StartArguments" tag
Open the project file in VS2005
Replace the Page tag with a Window tag in the XAML file
Replace the Page base class with Window base class in the CS file
Build the project and execute

实际上我做了红色标注出来的步骤.

改了之后的确可以访问数据库了,不过窗体变成了那种和应用程序一般的,没有了地址栏,按钮栏,标题栏之类的... 到底是为什么?怎么回事?谁能告诉我原因?
文章来源: 本站原创 引用(0) 阅读(93)
 
对《XBAP访问数据库的一个权限错误. 》有 0 条评论
发表评论
昵称

网址

电邮
打开HTML 打开UBB 表情 打开表情 隐藏 记住我 [注册]