Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,
I have two web servers with same application. I need to implement load balancer, due to this upload files are moved into separate server.

Two web servers are "server 1" and "server 2".

For "server 1" application, i upload the files in "server 2" shared path. When I access the "server 1" application from "Server 1", it is working fine. When I access "server 1" application from "server 2", it throws an error.

When I give <identity impersonate="true" username="user" password="pwd" />... it is working fine. Without impersonate how I do this ?

Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   capcom.CapCom.Closelog()
   capcom.CapCom.ProcessMulRequest(String RQxml)
   CAPRC.WebForm1.PostTransaction() in D:\ADIB\CAPRC\Engine.aspx.vb:1317
   CAPRC.WebForm1.Page_Load(Object sender, EventArgs e) in D:\ADIB\CAPRC\Engine.aspx.vb:812
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750
 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2443; ASP.NET Version:1.1.4322.2470
Posted
Updated 30-Jul-11 22:47pm
v3

1 solution

Well for a start, if you are trying to implement load balancing, do you think it is clever to load up Server 2 with all the file system calls for Server 1 application across to the shared folder on server 1??? Give 2copies of the application, one on server 1 and 1 on server 2.

As for the problem you mention, it is all do do with permissions on the source folder, you need to add permissions to the security groups that can access and execute on the shared folder to ensure they include the accounts for server 2.

Have you looked at the ASP.net webfarm framework? Introducing the Webfarm Framework[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900