Asked by:
How to Install Time Tracker Starter Kit in my host company

Question
-
User898353459 posted
Hi,
I would like my Host company to host Time Tracker Starter Kit so all my employee can login from our website and enter their times.
Is this doable ? How?
What it the prerequesties for this application to run?
How can I know if the host Compnay has the prerequesties?
Is using your timeTracker this way is free?
Thanks a lot
Thursday, March 20, 2008 1:02 PM
All replies
-
User555306248 posted
1) in VWD create a new Web Site and point it directly to your IIS local web server call it TimeTracker e.g. http://localhost/TimeTracker (since I have problem getting VWD web server to work using the Beta release) this step will create a web site on your local IIS, you can do this manually too.
2) Unzip the file downloaded into the C:\Inetpub\wwwroot\TimeTracker and overwrite any files there.
3) Launch the site in IE e.g. http://localhost/TimeTracker/Default.aspxCheck in web.config for connectionString, configure it according to your server name, password etc.
In Time Tracking System, it uses inbuild Membership classes for user creation, updation etc..
You have to register your DB with ASP.NET Membership classes by executing the command line utility in VS prompt
aspnet_regsql, it will open one window, where you have to configure DB.
If thsi helpful to you please mark it as answer, So it will help for other people
Hope it will help you, let me know.
Monday, March 24, 2008 12:14 AM -
User898353459 posted
Hi,
What I need to install for the SQL Server, is it the full SQL 2005, how to make it connecting?it gave me an error message when it tried to connect.
Do I use windows authentication or what???
Is there a free version of SQL that I can use? Does this mean that my host provider needs to have SQl Server?
Thanks
Amal
Tuesday, March 25, 2008 9:09 AM -
User555306248 posted
Time Tracker Starter Kit will run on SQL Express edition also, which is free
You can use windows authentication or other authentication also
check you web.config for connectionString
Set Try to set Data Source = "Server name" in connection string
Try also
Change in connectionString User Instance = false
<connectionStrings>
<add name="aspnet_staterKits_TimeTracker" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/>
</connectionStrings>Tuesday, March 25, 2008 11:29 PM -
User555306248 posted
Have you solved you problem, tried my solution, If yes mark it as answer So will be helpful for other people
Post it on forum
Wednesday, March 26, 2008 11:34 PM -
User898353459 posted
Thanks a lot for you response and sorry for the delay from my side, I was just consumed in another project.
I don't know why the SQLExpress sometimes connect and sometimes not.
I did not change the Connection string and I kept it as it is:
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inetpub\wwwroot\TimeTracker\App_Data\TimeTracker.mdf;Integrated Security=True;User Instance=True
and now, when I open the sln in VWD, it always shows the database with cross(as not connected) and I have to wait until it connects. Is this normal? Am i doing something wrong here? do I expect the connection to be gone like this and return a lone ot what?
If I used your Connection String above, this make the connection more reliable?
My web site is hosted under
http://smallbusiness.yahoo.com/webhosting, should I install SQLExpress and VWD to run the Visuol Studio Solution from host machine? or there are steps to install it in the host machine after I unit tested in VWD?
Can I add\Change to the code before I host it, or this is illegal?
Thanks a lot.
Amal
Monday, April 14, 2008 12:46 PM -
User898353459 posted
My Previouse question is still valid and it seems that the only way to make it running is to run from the VWD after waiting for the SQL to connect and it is using http://localhost:4811/TimeTracker/
I don't know from where it got the port no. 4811??!!!
using the IE with the same address\port and while the VWD has SQL connected, still failing with "IE Cannot display WebPage" all the time. Should it always run from inside the VWD?!?!?
Thanks
Monday, April 14, 2008 1:02 PM -
User555306248 posted
As I already post in thread, you have to setup web site using IIS
http://localhost:4811/TimeTracker/ this means that in VWD you are directly running as folder as web site so port number is used
for DB file place it in APP_Data folder & use in connection string as AttachDBFilename=|DataDirectory|TimeTracker.mdf
Let me know is any doubts is there
Please mark it as answer if this solved your problem
Monday, April 14, 2008 11:40 PM -
User898353459 posted
Hi Chetan,
I am confused. I did the setup the same way you described in your second thread here.
Do you recommend that I delete the folders now and the virtual dir from IIS and re set it up again to fix this port no.?does this going to fix the connection?
I had posted 2 threads after each other and you responded only to the last one. Can you please provide answer for both of them.
Thanks
Amal
Aml
Tuesday, April 15, 2008 9:03 AM -
User555306248 posted
Yes, delete the folder & create new virtual directory, follow the procedure what I told you in 2nd thred
It is working , Let me know
Tuesday, April 15, 2008 11:33 PM -
User898353459 posted
Hi,
I cleared everything and I still have an issue with SQL...although, there is no port number in the link any more which is good but the most I can get to work is the login page after that it crashs because it tried to connect to SQL.
SO, what I did is to follow thread no. 2 here again and not doing the virtual dir manually. then Registering the DB failed with this exception:
Setup failed.
Exception:
Unable to connect to SQL Server database.----------------------------------------
Details of failure
----------------------------------------System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
--- End of inner exception stack trace ---
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()--------
I tried to rebuild the website and run it from the VWD and I got this:
Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
File activation failure. The physical file name "c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker_log.ldf" may be incorrect.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
File activation failure. The physical file name "c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker_log.ldf" may be incorrect.Source Error:
Line 11: if (Roles.Enabled)
Line 12: {
Line 13: if (!Roles.RoleExists("ProjectAdministrator"))
Line 14: {
Line 15: Roles.CreateRole("ProjectAdministrator");
Source File: c:\Inetpub\wwwroot\TimeTracker\Global.asax Line: 13
Stack Trace:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
File activation failure. The physical file name "c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker_log.ldf" may be incorrect.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +3176017
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1357
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +53
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +3188374
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +3182568
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +385
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +770
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +54
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +2866958
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +96
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +2857363
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +64
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +2854535
System.Data.SqlClient.SqlConnection.Open() +274
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +85
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +5907946
System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +4249833
System.Web.Security.Roles.RoleExists(String roleName) +111
ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\Inetpub\wwwroot\TimeTracker\Global.asax:13-------------------
Then I changed the connection string as you adviced above in the web.config to be like this:
<
add name="aspnet_staterKits_TimeTracker" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/> <remove name="LocalSqlServer"/><
add name="LocalSqlServer" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/></
connectionStrings>--------------------
after that I got the IE and VWD showing th Login page(Default.aspx) then fail after I add a new user with the following error:
Invalid value for key 'attachdbfilename'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentException: Invalid value for key 'attachdbfilename'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Invalid value for key 'attachdbfilename'.]
System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +3190146
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2445
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +38
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +221
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +90[ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax.
Parameter name: connectionString]
System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +5915825
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +205
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +4227320
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +363
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +242
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +617
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +39
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3215-------------
Please advice what to do.
Thanks
Amal
Wednesday, April 16, 2008 11:04 PM -
User555306248 posted
You have to give the permission for folder c:\inetpub\wwwroot\TimeTracker\App_Data\ for user ''NT AUTHORITY\NETWORK SERVICE'
Right click on folder & on security tab add the ''NT AUTHORITY\NETWORK SERVICE' user & give full permission to it
I hope this will solve your problem
Let me know if any issues is their
Wednesday, April 16, 2008 11:20 PM -
User898353459 posted
Not Yet.
I add full permession to NetworkService(I could Not find NT Authority/NetworService) for the APP_Data folder and I tried also for the whole Time Tracker Folder...but it did not work.
After that I tried with both connection strings (the original and the one that you give to me) and it gives me the following:
System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
File activation failure. The physical file name "c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker_log.ldf" may be incorrect.
I tried to find the ldf file but it is not there.
I tried to register the db but if I used the Database= <default> or TimeTracker, it failed with this message:
Exception:
Unable to connect to SQL Server database.----------------------------------------
Details of failure
----------------------------------------System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
In the VWD even, it cannot connect and it asks to Choose the Data Source then it fails.
Please advice
Thanks
Thursday, April 17, 2008 9:21 AM -
User898353459 posted
to continue my trials from last thread.
I re-installed SQL server 2005 express eddition (64 bit since my PC is X64) on the top of my one and now I can register the DB as you said in your second thread.but I still have an issue that the ldf file is not correct. I can not find it in my machine.
I even give ASP.NET full authority and I am still having the same error message for the missing ldf.
Thanks
Thursday, April 17, 2008 11:12 PM -
User555306248 posted
I think it is the problem of user rights
Well I will search if any other way is there
Thursday, April 17, 2008 11:35 PM -
User898353459 posted
Thanks for trying to help.
That is what I got when I click the the DB inside the VWD:
"Unable to open the physical file "c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\TimeTracker\App_Data\TimeTracker.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."By the way I am using X64 machine with VWD2008 and in the same machine I have Visual stodio 2005 and 2008, if this can make any difference.
When I installed SQL express X64, I got this
- ASP.Net Version Registration Requirement (Warning)
<DIR> <DIR>Messages
ASP.Net Version Registration Requirement
</DIR></DIR>
64-bit ASP.Net is Registered. Required 32-bit ASP.Net to install Microsoft Reporting Services 2005(32-bit).
Then I continued to install the database services and the client componenet in the same installation
I installed for <default instance.>.
Do you see anything can cause the issue here?
Friday, April 18, 2008 9:36 AM -
User555306248 posted
Just check .NET version is set correct version in IIS
Sunday, April 20, 2008 11:31 PM