[英]'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I want to access root url of a Web application from a Windows forms Application.我想从 Windows forms 应用程序访问 Web 应用程序的根目录 url。
string rooturl = Billing_XML_WebTracking.WebForm1.RootUrl;
string url = rooturl + "/WebForm1.aspx";
webBrowser1.Navigate(url);
So I have added the below code to Web.config of the Web Application:所以我将以下代码添加到 Web 应用程序的 Web.config 中:
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</assemblies>
And the final code of Web.config file is而Web.config文件的最终代码是
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
</configuration>
But while building the solution, it is giving below error The type 'System.Web.UI.Page' is defined in an assembly that is not referenced.但是在构建解决方案时,它给出了以下错误类型“System.Web.UI.Page”是在未引用的程序集中定义的。 You must add a reference to assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
您必须添加对程序集“System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”的引用。
Please help me out.Thanks请帮帮我。谢谢
In References
you must add System.Web.dll
在
References
中,您必须添加System.Web.dll
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.