asp.net – 无法找到类型或命名空间名称’ProfileCommon'(在
发布时间:2020-12-16 07:19:58 所属栏目:asp.Net 来源:网络整理
导读:我知道它之前已被问过,但没有一个对我有效,而我的有点不同. 我的MVC 4项目在本地工作但在服务器中无法运行此错误: Compiler Error Message: CS0246: The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or
我知道它之前已被问过,但没有一个对我有效,而我的有点不同.
我的MVC 4项目在本地工作但在服务器中无法运行此错误: Compiler Error Message: CS0246: The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 194: } Line 195: Line 196: protected ProfileCommon Profile { Line 197: get { Line 198: return ((ProfileCommon)(this.Context.Profile)); Source File: c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroote3c4a897ff4f4317App_Web_pageheader.ascx.cdcab7d2.rpk2croq.0.cs Line: 196 我编写了一个自定义ProfileProvider并配置项目以使用它: <profile enabled="true" defaultProvider="sql"> <providers> <clear /> <add name="sql" type="BusinessLogic.ProfileProvider" connectionStringName="c" applicationName="/" /> </providers> </profile> 我使用ProfileBase类来访问用户配置文件而不是ProfileCommon.上面的错误是在编译器生成的文件中.为什么asp.net生成一个无法编译的代码?为什么它在本地工作? 我在本地安装了.Net Framework 4.5.1,但在服务器中它是4.5.它与问题有关吗? 解决方法
当我们从Web站点项目迁移到Web应用程序项目时,我的部署中发生了同样的事情(尽管WebForms使用WebAPI服务).
我们的解决方案是从服务器上的已部署文件夹中删除PrecompiledApp.config,然后重新启动IIS. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 为什么我不能在我的代码asp.net c#中使用app_code中的代码文
- 从ASP.NET工作进程ID获取性能计数器实例名称(w3wp#XX)
- asp.net – 在MVC3或IIS 7.5中禁用x-frame-options
- 缓存ASP.NET HTTP Handler服务器和客户端的响应
- netcore服务程序暴力退出导致的业务数据不一致的一种解决方
- asp.net-mvc – MVC3 Html.HiddenFor(Model => Model.Id)不
- asp.net-mvc-5 – 更改消息“密码必须至少包含一个非字母或
- asp.net core html 选择框checked选中
- ASP.Net WebAPI与Ajax进行跨域数据交互时Cookies数据的传递
- asp.net-mvc – ASP.NET MVC中的视图文件/目录结构应该是什
推荐文章
站长推荐
- asp.net-core – ASP.NET Core中的状态码406(不可
- asp.net – 在成功登录时添加声明并在应用程序的
- asp.net – 我应该有多少DBContext
- asp.net-mvc – 通过programmming导入Ms Access数
- asp.net-mvc – 使用Web Api验证.NET MVC应用程序
- asp.net – LinkBut??ton CommandName和CommandA
- asp.net mvc 中 一种简单的 URL 重写
- 如何在asp.net中从c#运行javascript
- asp.net 使用ObjectDataSource控件在ASP.NET中实
- asp.net – 最佳AJAX框架
热点阅读