Print Page | Close Window

n-tier deployment

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=857
Printed Date: 11-Jun-2026 at 4:34am


Topic: n-tier deployment
Posted By: orcities
Subject: n-tier deployment
Date Posted: 25-Jun-2008 at 8:55am
I have been trying to find how to do n-tier deployment. I have looked through all of the instructional units. I have created the Server portion, I believe correctly. I am having a problem with the client portion.
 
I know they each need a ibconfig. I have one compiled into the shared apphelper project. But I have also added one loosely to each project. The server ibconfig would have the connection string to the database.
 
What does the client ibconfig have. I have left the connection string in the rdbKey elements. I have change the remoting address to that of the server.
 
When I run the application it fails. I am also running the CABANA framework. Publish hasn't worked successfully. I am trying a setup project next.



Replies:
Posted By: orcities
Date Posted: 26-Jun-2008 at 3:26pm
I have built the IIS Deploy Example. I am still having a problem with the connection. Its gives an error "Unable to Login".  Looking at the Debug.xml file it gives the below error (IIS Server version):
 
Note: I am using my dev machine. The database is on a seperate machine. When I run any other IdeaBladeTutorial I am doing the same thing with the same connection string and they work fine, just not going through IISServer. I am also using the sa account to connect. But it doesn't seem to be going thru.
 
The client uses the embedded AppHelper ibconfig file. It is remoting to the IIS Server which then has the correct connection string.
 
System.Data.OleDb.OleDbException: Login failed for user ''. The user is not associated with a trusted SQL Server connection. at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at IdeaBlade.Rdb.AdoHelper.CreateDbCommand(IDbConnection pConnection) at IdeaBlade.Persistence.Rdb.RdbQuerySqlFormatter.Fetch(Type pEntityType, DataSet pDataSet, IDbSelectCommandBuilder pDbCommandBuilder) at IdeaBlade.Persistence.Rdb.RdbQuerySqlFormatter.Fetch(Type pEntityType, DataSet pDataSet, ParameterizedSql pParamSql, Int32 pCommandTimeout) at IdeaBlade.Persistence.Rdb.RdbQuery.Fetch(DataSet pDataSet, IDataSourceKey pDataSourceKey) at IdeaBlade.Persistence.Server.PersistenceServer.Fetch(IEntityQuery pQuery, DataSet pDataSet, IDataSourceKey pDsKey) at IdeaBlade.Persistence.Server.PersistenceServer.Fetch(SessionBundle pSessionBundle, IEntityQuery pEntityQuery)


Posted By: orcities
Date Posted: 26-Jun-2008 at 3:32pm

Client:

<?xml version="1.0" encoding="utf-8"?>

<ideaBlade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.07">

  <useDTC>false</useDTC>

  <copyLocal>false</copyLocal>

  <loginManagerRequired>false</loginManagerRequired>

  <enforceDynamicTypeSecurityOnServer>false</enforceDynamicTypeSecurityOnServer>

  <logging>

    <archiveLogs>false</archiveLogs>

    <logFile>DebugLog.xml</logFile>

    <usesSeparateAppDomain>false</usesSeparateAppDomain>

    <port>0</port>

  </logging>

  <rdbKey name="default" databaseProduct="Unknown">

    <connection>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=IdeaBladeTutorial;Data Source=localhost</connection>

    <probeAssemblyName>Entities</probeAssemblyName>

    <probeAssemblyName>AppHelper</probeAssemblyName>

  </rdbKey>

  <remoting>

    <remotePersistenceEnabled>true</remotePersistenceEnabled>

    <communicationsTechnology>Remoting</communicationsTechnology>

    <remoteBaseURL>http://localhost</remoteBaseURL>

    <serverPort>80</serverPort>

    <serviceName>QuickAppCS/PersistenceServer.rem</serviceName>

    <serverDetectTimeoutMilliseconds>-1</serverDetectTimeoutMilliseconds>

    <proxyPort>0</proxyPort>

  </remoting>

  <notificationService>

    <enabled>false</enabled>

    <serverPort>0</serverPort>

    <clientPort>0</clientPort>

  </notificationService>

  <webService>

    <remoteBaseURL />

    <serverPort>0</serverPort>

    <serviceName />

    <authentication>None</authentication>

  </webService>

  <appUpdater />

</ideaBlade>



Posted By: orcities
Date Posted: 26-Jun-2008 at 3:33pm

<?xml version="1.0" encoding="utf-8"?>

<ideaBlade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.07">

  <useDTC>false</useDTC>

  <copyLocal>false</copyLocal>

  <loginManagerRequired>false</loginManagerRequired>

  <enforceDynamicTypeSecurityOnServer>false</enforceDynamicTypeSecurityOnServer>

  <logging>

    <archiveLogs>false</archiveLogs>

    <logFile>DebugLog.xml</logFile>

    <usesSeparateAppDomain>false</usesSeparateAppDomain>

    <port>0</port>

  </logging>

  <rdbKey name="Default" databaseProduct="Unknown">

    <connection>Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=sa;Initial Catalog=IdeaBladeTutorial;Data Source=LOC-DEVDB\Sql2005</connection>

    <probeAssemblyName>FirstApp.Business</probeAssemblyName>

  </rdbKey>

  <remoting>

    <remotePersistenceEnabled>true</remotePersistenceEnabled>

    <communicationsTechnology>Remoting</communicationsTechnology>

    <remoteBaseURL>http://localhost</remoteBaseURL>

    <serverPort>80</serverPort>

    <serviceName>QuickAppCS/PersistenceServer.rem</serviceName>

    <serverDetectTimeoutMilliseconds>-1</serverDetectTimeoutMilliseconds>

    <proxyPort>0</proxyPort>

  </remoting>

  <notificationService>

    <enabled>false</enabled>

    <serverPort>0</serverPort>

    <clientPort>0</clientPort>

  </notificationService>

  <webService>

    <remoteBaseURL />

    <serverPort>0</serverPort>

    <serviceName />

    <authentication>None</authentication>

  </webService>

  <appUpdater>

    <updateURL />

    <versionFileName>FirstAppVersion.xml</versionFileName>

    <appLauncher>AppLauncher.exe</appLauncher>

  </appUpdater>

</ideaBlade>



Posted By: kimj
Date Posted: 02-Jul-2008 at 6:00pm

Is it possible that your SQL Server allows only Windows authentication?  I notice that your client-side rdbKey connection string (which is not actually used when using a BOS) contains the attribute for integrated security, while your server-side rdbKey connection string does not. 

To use integrated security from IIS you need to ensure that the account running the IIS service on machine A has privileges to the SQL Server on machine B.  The account is probably either ASPNET or "Network Service", or you can set up a domain account.
 
Also double check the debug log on the server to see where it loaded the IdeaBladeConfig info from - it's possible it is not using the configuration information that you think it is.



Print Page | Close Window