C# ';Web,版本=4.0.0.0,区域性=neutral,PublicKeyToken=b03f5f7f11d50a3a';
我想从Windows窗体应用程序访问Web应用程序的根urlC# ';Web,版本=4.0.0.0,区域性=neutral,PublicKeyToken=b03f5f7f11d50a3a';,c#,asp.net-mvc,winforms,C#,Asp.net Mvc,Winforms,我想从Windows窗体应用程序访问Web应用程序的根url string rooturl = Billing_XML_WebTracking.WebForm1.RootUrl; string url = rooturl + "/WebForm1.aspx"; webBrowser1.Navigate(url); 因此,我在Web应用程序的Web.config中添加了以下代码: <assemblies> <add assembly="System.Runtim
string rooturl = Billing_XML_WebTracking.WebForm1.RootUrl;
string url = rooturl + "/WebForm1.aspx";
webBrowser1.Navigate(url);
因此,我在Web应用程序的Web.config中添加了以下代码:
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</assemblies>
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>
但在构建解决方案时,它给出了以下错误
类型“System.Web.UI.Page”是在未引用的程序集中定义的。您必须添加对程序集“System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”的引用
请帮助我。谢谢在
引用中
您必须添加System.Web.dll
将对程序集“System.Web”的引用添加到winforms项目中