401 Error using remoting through DataPortal

401 Error using remoting through DataPortal

Old forum URL: forums.lhotka.net/forums/t/3780.aspx


eslater posted on Thursday, October 25, 2007

I am trying to setup my winforms app to run in a remoting environment but am getting a 401 error which I can seem to solve and am hoping someone else may have a solution.

I have the dataportal setup to run in its own Application Pool using .net 2.0.  The Application Pool is using the Network Service identity.  A portion of my web.config file is:

<appSettings>
  <add key="CslaAuthentication" value="CSLA"/>
 </appSettings>
 <connectionStrings>
    <add name="DBName" connectionString="Data Source=SQLServer;Initial Catalog=MyDB;Integrated Security=True"/>
    <add name="Security" connectionString="Data Source=SQLServer;Initial Catalog=MyDB;Integrated Security=True"/>
  </connectionStrings>
 <system.runtime.remoting>
  <application>
   <service>
    <wellknown mode="SingleCall" objectUri="RemotingPortal.rem" type="Csla.Server.Hosts.RemotingPortal, Csla"/>
   </service>
   <channels>
    <channel ref="http">
     <serverProviders>
      <provider ref="wsdl"/>
      <formatter ref="soap" typeFilterLevel="Full"/>
      <formatter ref="binary" typeFilterLevel="Full"/>
     </serverProviders>
    </channel>
   </channels>
  </application>
 </system.runtime.remoting>

I have added NT AUTHORITY\NETWORK SERVICE as a login to SQL Server and also as a user of the database.

Any help solving this would be appreciated as I have spent for too much frustrating time on this already.

Thanks!

eslater replied on Saturday, October 27, 2007

Anyone have any ideas?  I am still banging my head.  I think it must have something to do with the Application Pool Identity since it is really the only strange part about this setup.

RockfordLhotka replied on Sunday, October 28, 2007

Have you tried the standard debugging technique of putting a simple aspx page in the virtual root and trying to navigate there in a browser? If it is a basic IIS/ASP.NET issue, it is easier to debug them with aspx pages than with remoting, asmx or svc technologies.

Copyright (c) Marimer LLC