Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Admin Database Login

  1. #1
    Scott Mitchell is offline Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Default Admin Database Login

    Can I have the Admin use a different login to the database so I know if SQL activity is from the storefront or the admin?

    I tried to modify the web.config as follows:

    <appSettings>
    <remove key="DBConn"/>
    <add key="DBConn" value="data source=myserver;initial catalog=storefront;user id=sfadmin;password=qwerty;persist security info=True;packet size=4096;"/>
    <add key="IsAdminSite" value="1"/>
    </appSettings>

    but no luck. SQL Profiler shows stroefront login during both storefront activity and activity from the admin.

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    That's not going to work without some customization, no. You'd need to modify the source to do a check on SQL transactions to see if they're coming from the admin site. Most of that would be in DB.cs, but there will be little bits here and there throughout the app that would need adjusting.

  3. #3
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Unhappy

    I actually had to do this the other day too. Without code it isn't possible and with the little items I had to debug it wasn't worth the time. I ended just doing everything on our Dev system to test.
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)

  4. #4
    Scott Mitchell is offline Junior Member
    Join Date
    Apr 2010
    Posts
    2

    Default

    Thanks for the responses.

    My thought was that if I could determine who was performing an update on a table, an admin or a customer, I could apply different business logic during the update.