Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

ASPState Database

what do I change the sqlconnectionstring to be in web.config to make the user that access the ASPState database to always be machinename/ASPNET.  Right now it is using my domain user, but I don't want to add permissions for every domain user.

<sessionState
    mode="SQLServer"
    stateConnectionString="tcpip=127.0.0.1:42424"
    sqlConnectionString="data source=127.0.0.1; integrated security=true"
    cookieless="false"
    timeout="20"
/>

Thanks
0
barnetjeb
Asked:
barnetjeb
1 Solution
 
YZlatCommented:
add the following coe to your web.config file in between <configuration> tags and right after </system.web> tag:


 </system.web>
<appSettings>
 <add key="connStr" value="Provider=Microsoft.Jet.OLEDB.4.0;Password='';User ID=Admin;Data Source=\\myPath\db1.mdb;" />

</appSettings>

</configuration>

Then from your code you can access your connection string as

ConnStr=ConfigurationSettings.AppSettings("connStr")
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now