January 2004 - Posts
While deploying our CMS system to one of our clients server we ran into a problem with web service calls and proxies. The client was running its network behind a ISA server and all traffic had to go through the proxy. But when the runtime was making web service calls outside the ISA server (across the INTERNET to a server located at our office) it seems those calls were not being routed through the proxy and were therefore timing out.
The HttpWebClientProtocol class which our web service class eventually inherits exposes a property named Proxy which accepts a IWebProxy value. The class WebProxy exposes a static method named GetDefaultProxy which return a WebProxy instance with the values defined in Internet Explorer LAN settings. By using this WebProxy instance to the web service class you automatically assign the default values from IE to your web service instance.
Net.Disill.Report.Report reporter = newDisill.Net.Disill.Report.Report();
reporter.Proxy = System.Net.WebProxy.GetDefaultProxy();
From now on I will assign the default proxy to all web service instances I create, since I never know what kind of environment our products gets deployed in. But this method should handle these kind of situations.
Today I've been getting our CMS system to run on a load balanced server setup.
Setting up the Load Balance Cluster is really easy in Windows Server 2003 (I'm using the web edition) once you figure out how it works.
Running a asp.net application on multiple servers requires you to keep the session and application state in sync across servers, so it a client suddenly switches to another server his state lives on. Getting the session state was easy, mark all classes that are stored in session and serializable and setup a sql server or a state service to persist the state. But getting the HttpApplicationState to stay in sync between the server is another matter. When the application loads it fills the AppState with some variables that may or may not change while the application is running. But if the variables change, they only change on the server that it was changed on, so client connected to the other server will not see the changes :S
One way I've though of is use the Cache instead and create a file dependency, touching the file each time the items change. But this would only work if all the servers shared a common share as the site root. (which I was not able to do since IIS for some reason would not allow me to map the local path to a mapped network drive, don't know why)
Anyone found a way to keep the HttpApplicationState in sync across servers ?
Why can't we use a appstate_service to persist our application state, similar to what I've considered about caching out of process in asp.net
Last Friday I got my company accepted into the ISV partner program and today I passed the 30-315(web apps-c#) test with flying colors(885 points). I'm starting to feel I'm really bonding with Microsoft ;)
Note to self: read and reread all questions, I spotted a wrong answer when commenting on the question :(
Next : 70-320 : Developing XML Web Services and Server Components with Microsoft Visual C# and the Microsoft .NET Framework
While studying for my first .net exam I decided it would be a good idea to try take some demo exams and find out how I was doing. I found some assessments on Microsoft.com but those are not good at all.
So I got the idea of a community driven website that allows people to take demo exams that are dynamically created by community submitted questions. All it would need is a simple asp.net application and a active community to submit test questions. Questions would be categorized by exam so I could for example ask for questions that are only for a certain exam. Features that could be added later would be user registration and having a history of test-exams and a scoring system.
I'd be willing to donate hosting and bandwidth for such a site (w2k3, mssql, xeon, 10mbits fiber, e.t.c) and I think it make a nice personal side-project. What do you guys think about this idea ? Would anybody submit demo questions, or would this be a failure ?
As you can see, I already thought up a domain for the site ;)
More Posts