In my web.config file i have given like this.
<system.web>
<rolemanager enabled="true" />
<authentication mode="Forms" />
<compilation debug="true" targetframework="4.0" />
</system.web>
<system.web>
<sessionstate mode="SQLServer">
sqlConnectionString="mycon"
sqlCommandTimeout="30"
cookieless="UseUri"
timeout="20">
</sessionstate>
</system.web>
<connectionstrings>
<add name="mycon" connectionstring="Data Source=Sreekanth; Integrated Security=True; Database=Northwind" />
</connectionstrings>
error is
The sqlConnectionString attribute or the connection string it refers to cannot contain the connection options 'Database', 'Initial Catalog' or 'AttachDbFileName'. In order to allow this, allowCustomSqlDatabase attribute must be set to true and the application needs to be granted unrestricted SqlClientPermission. Please check with your administrator if the application does not have this permission.
I want to access the connection string in my application.
Reply |
Reply with attachment |
Alert Moderator