Some how, I managed to load and compile the ProjectTracker20vb and csla20vb solutions ...! Now, they are compiled without any errors.
To give you an idea, I placed the Project Parts on the DEV Machine (Windows 2003 Server SP2) and I am opening them locally from my Machine (Windows XP + VS2005). So, from VS, I opened the solution files from a Shared Folder over the network. I usually follow this method and it works. They opened and complied successfully.
Of course, I had to add the required references to the DLLs, after I got 2 errors. The DLLs that were missing from the references are:
ProjectTracker.Library.dll and Csla.dll.
I setup a virtual directory on the DEV Server Machine as per the instructions here : http://www.lhotka.net/files/csla20/BuildCsla.pdf.
I tried to run the Web Site using this URL:
And WOW, it opened with the message "Welcome to the Project Tracker system". Great !
Then, I click on Login, and try to Enter User Name and Password (pm/pm) and Click Login, after that I got this error:
Could not load file or assembly 'EnterpriseServicesHostvb' or one of its dependencies. The system cannot find the file specified.
I did follow the instructions to register the EnterpriseServicesHostvb and it was registered successfully. But it looks to me that it was registered on my Local Machine.
Please help me to solve this error.
Tarek.
Tarek,
Can you check in the web.config to see if you have an uncommented key for CslaDataPortalProxy in the appSettings section. You can comment this out to see if that resolves.
Also, you should check the connection string settings to determine where the sql express database is located. There will be a .mdf and .ldf file and you need to ensure that the proper accounts have permissions to these files.
Hope that helps.
cliffordru:Tarek,
Can you check in the web.config to see if you have an uncommented key for CslaDataPortalProxy in the appSettings section. You can comment this out to see if that resolves.
Ok, I will check that when I am back at work, and will let you know the result.
Also, you should check the connection string settings to determine where the sql express database is located. There will be a .mdf and .ldf file and you need to ensure that the proper accounts have permissions to these files.
Yes, I already followed the insturctions to update the conneciton string to .mdg and .ldf files. I put the path Local to Server Machine, ie, something like: E:\..\...
I am not sure that this is the casue of the error. It looks to me that the ASP.NET Engine is trying to locate this file/dll, and it is not found. I think I need to register this library on the server, in the same way I registered it on my Machine locally, but I do not know how ? I mean, how I can open VS Command Line on the Server, and issue this command to register this library ? Does this mean that I have to install VS2005 on the Server ?
Please help.
cliffordru:Tarek,
Can you check in the web.config to see if you have an uncommented key for CslaDataPortalProxy in the appSettings section. You can comment this out to see if that resolves.
Also, you should check the connection string settings to determine where the sql express database is located. There will be a .mdf and .ldf file and you need to ensure that the proper accounts have permissions to these files.
Hope that helps.
I checked the web.config, and following is the appSettings section:
<
appSettings><
add key="CslaAuthentication" value="CSLA"/><!--
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.RemotingProxy, Csla"/><add key="CslaDataPortalUrl" value="http://localhost:3134/RemotingHost/RemotingPortal.rem"/>
--><!--
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.WebServicesProxy, Csla"/><add key="CslaDataPortalUrl" value="http://localhost:3137/WebServicesHost/WebServicePortal.asmx"/>
--><
add key="CslaDataPortalProxy" value="EnterpriseServicesHost.EnterpriseServicesProxy, EnterpriseServicesHostvb"/></
appSettings>I did ot change anything in this section.
As per my understanding from you recommendation, I will comment out the CslaDataPortalProxy, right ?
After I commented out this line
<add key="CslaDataPortalProxy" value="EnterpriseServicesHost.EnterpriseServicesProxy, EnterpriseServicesHostvb"/>
I ran the project again, and after I login, I got this error:
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: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source Error:
Line 109:
Line 110: Using cn As New SqlConnection(Database.SecurityConnection)
Line 111: cn.Open()
Line 112: Using cm As SqlCommand = cn.CreateCommand
Line 113: cm.CommandText = "Login"
Please help !
Tarek.
OK, you can say CONGRATULATIONS to me !
I solved the problem.
I think this is becuase SQL Server Express was not activated on the DEV Machine. So, I attached the PTracker and PTSecurity Database to SQL Server 2005 Engine, and changed the connection strings in web.config accordingly, and everything worked successfully.
So far, I only test the Web Client Version.
Can some one explain to me what all these proxy thing settings are for, in "appSettings" in web.config ? Can you give me a link to understand more about them ?
<
appSettings><
add key="CslaAuthentication" value="CSLA"/><!--
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.RemotingProxy, Csla"/><add key="CslaDataPortalUrl" value="http://localhost:3134/RemotingHost/RemotingPortal.rem"/>
--><!--
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.WebServicesProxy, Csla"/><add key="CslaDataPortalUrl" value="http://localhost:3137/WebServicesHost/WebServicePortal.asmx"/>
--><!--
<add key="CslaDataPortalProxy" value="EnterpriseServicesHost.EnterpriseServicesProxy, EnterpriseServicesHostvb"/>--></
appSettings>Also, I noticed that, after I used SQL Server 2005, there is no difference if I comment or uncomment the "CslaDataPortalProxy" in appSettings as shown above. In all cases, it works.
You help will be greatly appreciated.
Tarek.
Tarek,
Glad to hear you were able to resolve the issue. The proxy settings are used to configure the business objects to work in an N-Tier environment. Essentially they dictate how remote objects will be passed between tiers. Unless you are using a separate web and application server you can leave these commented out and use the default setting which is to run the data portal locally.
To learn more, your best resource would be to purchase Rocky's business object book as well as his eBooks. There is a wealth of information in these books covering both Csla as well as .Net best practices and concepts.
Dear All,
First of all, the problem of WSS was resolved !! When I installed WSS, it replaced the default website ... ! After I removed WSS, the default web site worked normally.
Then I tried to browse the PTWeb project, and I got error "cannot login to Database PTSecurity with the ASP.NET User..." or something like that.
Then, I changed the case of the Database Name in SQL Server 2005 to match it with the case used in web.config.... ! and guess what, it worked !!!
So, the Database names used in web.confing are Case Sensitive ??!! This is realy new to me !
Now, PTWeb is working fine on the new server. My next step is to try use Windows Authentication in this project. I have created a separate thread for this, and there are few things to try already.
But, still getting intermittent error when connecting the project using Database Name to SQL Server Express on the local machine. I hope some one can give me some help on this.
I like to have local installation so that I can take to project with me home on a Laptop to play with it.
Questions:
What is needed to connect the project to SQL Server Express locally ?
Why these connection entries (PTracker.mdf and Security.mdf) are showing under "Server Exploere" window under Data Connections, with the following connection string:
Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Visual Studio Projects\csla20\ProjectTracker20vb\PTracker.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Visual Studio Projects\csla20\ProjectTracker20vb\Security.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
From where they are coming, and are they useful ? When I click on the PTracker.mdf to expand it, I get error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."
Regards ...
Tarek.
Copyright (c) Marimer LLC