Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > Running a site without the VS debugger View modes: 
User avatar
Member
Member
chris.brandt-ernex - 5/5/2009 2:48:18 PM
   
Running a site without the VS debugger
I've just installed Kentico for the first time. Currently the only way I can run the site is with the Visual Studio debugging host. When I try to access the site through IIS I seem to have a variety of permissions errors.

Initially I was getting an ASP.Net error in the event log saying "aspnet_wp.exe could not be launched because the username and/or password supplied in the processModel section of the config file are invalid."

Then I tried re-registering .Net 2.0 as per the Knowledge Base article. That only changed the component that complained.

Now I get a login failure exception when it tries to access the database with the local ASPNET user account. "Exception message: [DataConnection.ExecuteQuery]: Query: Proc_CMS_QueryProvider_SelectGeneration: caused exception: Cannot open database "KenticoCMS" requested by the login. The login failed."

How is it expecting to connect to the database? Is it using a single back-end user (ie, ASPNET), if so how do I set up that user in the database? Or does each user have some access to the database?

Thanks Chris.

User avatar
Member
Member
asdf-asdf - 5/6/2009 3:45:39 AM
   
RE:Running a site without the VS debugger
This is pretty simple and straightforward. You just need to grant access permission for SQL to user.
As any other asp.net web application kentico is having web.config file - in this file you are expected to specify an account, database name and database server name. These are used for accessing the DB.

Provided you are using SQL user authentication:
<add name="CMSConnectionString" connectionString="Persist Security Info=False;database=databasename;server=servername;user id=username;password=password;Current Language=English;Connection Timeout=240;" />


Provided you are using windows integrated authentication
<add name="CMSConnectionString" connectionString="Persist Security Info=False;Integrated Security=SSPI;database=databasename;server=servername;Current Language=English;Connection Timeout=240;" />


In either way you need to have this user created in your SQL and this user is expected to be owner of the kentico DB.

User avatar
Member
Member
chris.brandt-ernex - 5/6/2009 11:54:37 AM
   
RE:Running a site without the VS debugger
So what I'm reading is that I have to create a user login in SQL server for Kentico to use. If I'm using Windows Authentication, I need to allow the ASPNET user access to my SQL server. Security wise, that would be a bad idea for a production site and I'm not sure why it's an option.

In any case, why wouldn't this have been taken care of during installation?

User avatar
Member
Member
chris.brandt-ernex - 5/6/2009 12:20:43 PM
   
RE:Running a site without the VS debugger
I guess I also need to know what permissions this user needs. Again, I'm not sure why I'm setting this up manually I must have missed something in the install.

The ASPNET user is set up and able to login but now I'm stuck at an invalid website page from Kentico. It wants me to go to the Site Manager but after logging in there I'm taken back to the same page.

How did I mess this up?

User avatar
Member
Member
asdf-asdf - 5/7/2009 5:32:58 AM
   
RE:Running a site without the VS debugger
You are wrong. You can specify exactly which account you would like your application to run. Provided you are using Windows XP you are using ASPNET for running ALL of your asp.net application. But you will never ever use XP for production environment do you?
When in server edition of windows you simple specify the account under which you would like to run the application - the concept is called application pool. What you gonna do next is to grant db_owner permission for this user in SQL to kentico DB.

See the documentation at http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/f05a7c2b-36b0-4b6e-ac7c-662700081f25.mspx?mfr=true (also I would recommend you to perform some research in this topic so you willl no screw it up later on)