简体   繁体   English

用户DefaultApp池登录失败

[英]Login failed for user DefaultApp pool

I am working on a local DotNetNuke site, and all goes well. 我正在本地DotNetNuke网站上工作,一切顺利。 But after installing a custom module I created, in which I use Linq 2 Sql. 但是在安装了自定义模块之后,我创建了一个我使用Linq 2 Sql的模块。 Suddenly I get a module load exception 突然我收到模块加载异常

"The login failed. Login failed for user 'IIS APPPOOL\\DefaultAppPool'". “登录失败。用户'IIS APPPOOL \\ DefaultAppPool'的登录失败”。

The site itself is working fine, the connectionstrings in my web.config files all use SQL-Logins, so it seems, somehow, my module chooses to use integrated security over my configured security. 该站点本身运行正常,我的web.config文件中的连接字符串全部使用SQL登录,因此,看起来,我的模块选择以某种方式使用集成安全性而不是配置的安全性。

I tried fixing my connectionstrings, editing the web.config and resaving. 我尝试修复连接字符串,编辑web.config并重新保存。

I also tried giving the "DefaultAppPool" rights to the Database, and tried running it under LocalSystem. 我还尝试赋予数据库“ DefaultAppPool”权限,并尝试在LocalSystem下运行它。 These both work, but are not the way it should work. 两者都起作用,但不是它应该起作用的方式。 The module should be installable on every configuration, regardless of the security. 无论安全性如何,模块都应可安装在每种配置上。

I don't know much DotNetNuke, but from what I see here, seems like something is accessing the SQL server using default authentication which is windows based, and the user running your application is the application pool name, in your case, it is IIS APPPOOL/DefaultAppPool, the easiest fix is to go to iis -> application pools -> find your application pool used in application -> click it and then click 'Advance Settings' in Actions panel. 我对DotNetNuke的了解不多,但是从这里我看到的似乎是某种东西正在使用基于Windows的默认身份验证来访问SQL Server,并且运行您的应用程序的用户是应用程序池名称,在您的情况下是IIS APPPOOL / DefaultAppPool,最简单的解决方法是转到iis->应用程序池->查找应用程序中使用的应用程序池->单击它,然后在“动作”面板中单击“高级设置”。 Find 'Identity' property and change it to localsystem. 找到“身份”属性,然后将其更改为localsystem。 or you could grant permission to the user 'IIS APPPOOL\\DefaultAppPool' for the given database. 或者您可以为给定数据库的用户“ IIS APPPOOL \\ DefaultAppPool”授予权限。

Also you would still need to check why the connection string is not used. 另外,您仍然需要检查为什么不使用连接字符串。

Please mark as solution if it solve your problem. 如果解决了您的问题,请标记为解决方案。

Thanks for the reply! 谢谢回复! But i found out i did not actually pass any connectionstring to my linq2sql databasecontext. 但是我发现我实际上没有将任何连接字符串传递给我的linq2sql databasecontext。 By passing it, i got it to work 通过它,我就可以工作了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM