New Posts New Posts RSS Feed: n-tier deployment
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

n-tier deployment

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: n-tier deployment
    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.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post 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>

Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post 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>

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1284
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down