小编HeM*_*New的帖子

Visual Studio 2010 - 仅显示活动文件的警告

我希望你能帮我解决Visual Studio 2010中的问题.

通常在Visual Studio 2008中,当我编译项目时,会显示所有文件的警告.但在Visual Studio 2010中则不然.当我编译项目时,警告会显示,直到文件处于活动状态,然后只有错误列表中显示活动文件的警告.

我最近发现了一些新问题:问题似乎只出现在ASP.NET页面(.master,.aspx)中,而不是在Behind-Code-Files(.master.cs,.aspx.cs)中.与ASP.NET页面相关的警告是否存在问题(后面的代码文件除外)?

提前致谢.

最诚挚的问候,HeManNew

.net asp.net warnings visual-studio

8
推荐指数
1
解决办法
981
查看次数

始终使用SQL Azure从会话状态提供程序(实体框架)接收"超时期限"

始终如一,我从ASP.NET 4.5 Windows Azure Web角色中的会话状态模块收到错误,该错误指向SQL Azure数据库.会话状态模块正在使用dbcontext.例外包括 stacktrace是:

System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=14993;  ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at …
Run Code Online (Sandbox Code Playgroud)

sql-server timeout azure azure-sql-database

5
推荐指数
1
解决办法
2145
查看次数

ASP.NET Universal Providers - Roleprovider不会在cookie中缓存角色

具有讽刺意味的是,我的角色提供者不再将角色缓存在cookie中.那是在早些时候工作.不幸的是,我注意到只有现在,所以我不能说是什么导致了这个问题.但我认为这与通用提供商的新版本1.2(8月16日发布)的更新有关.

我对roleprovider的配置如下:

 <roleManager enabled="true" cacheRolesInCookie="true" cookieName="X_Roles" 
cookiePath="/" cookieProtection="All" cookieRequireSSL="true" cookieSlidingExpiration="true" cookieTimeout="1440" 
createPersistentCookie="false" domain="" maxCachedResults="25" defaultProvider="XManager_RoleProvider">
<providers>
<clear/>
<add name="XManager_RoleProvider" type="ManagersX.XManager_RoleProvider, AssemblyX" 
connectionStringName="XEntities" applicationName="/" rolesTableName="Roles" roleMembershipsTableName="Users_Roles"/>
</providers>
</roleManager>
Run Code Online (Sandbox Code Playgroud)

使用rolemanager(loginviews,带有sitemaptrimming等的菜单)一切正常,但它不再缓存角色了.会员提供者,会话状态等也正常工作,并且正确设置了它们的cookie.

静态Roles类的所有属性都已正确设置,Httpcontext(IsSecureConnection等)中的所有属性也都是正确的.

角色cookie是先前设置的,但不再是.我希望有人可以帮我解决我的问题.

提前致谢.

最好的祝福,

HeManNew

更新: 请问我没有人遇到同样的问题或提示吗?

membership cookies roles roleprovider

3
推荐指数
1
解决办法
2462
查看次数