PRB: Type initializer for System.Net.HttpWebRequest ...

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
anthonyrstevens
Posts: 3
Joined: Wed Mar 15, 2006 3:14 pm

PRB: Type initializer for System.Net.HttpWebRequest ...

Post by anthonyrstevens » Wed Mar 15, 2006 3:31 pm

Hi!

I get the error message:

The type initializer for "System.Net.HttpWebRequest" threw an exception.

When I log in to a remote Vault server from my local WinXP machine.

I can log in via a web browser from the same machine.
I can log in via the Vault Client when I remote desktop into the Vault server.

I have both .NET 1.1 and 2.0 installed on my local WinXP box, and have tried uninstalling and reinstalling both .NET and Vault Client, with no success.

Can someone help me out?

Client Information
Vault Client Version: 3.1.2.3511
.Net Framework Version: 1.1.4322.2032
Operating System: Microsoft Windows XP Professional
Service Pack: 2.0
OS Version: 5.1.2600
Total Physical Memory: 1023.4 MB
Time Zone: (GMT-08:00) Pacific Time (US & Canada); Tijuana

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Mar 15, 2006 3:46 pm

Looks like some sort of network error. Is there a corresponding error in the Vault Server log? It's sgvault.log and is in the Vault Server machine %windir%\temp\sgvault directory.

Is this a new problem? If so, did you recently make any changes to your machine or network: firewalls, proxies, anti-hacker, anti-virus software.

Are other users experiencing this problem?
Linda Bauer
SourceGear
Technical Support Manager

anthonyrstevens
Posts: 3
Joined: Wed Mar 15, 2006 3:14 pm

Post by anthonyrstevens » Wed Mar 15, 2006 6:13 pm

There is no corresponding error in the Vault Server log.

Re: new stuff, this started happending after I did a bunch of updates on my machine to use the .NET 2.0 Framework and VS.NET 2005. (Although I still have .NET 1.1 installed as well).

Do you think I need to uninstall and re-install the new .NET components?

Thanks for any help.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Thu Mar 16, 2006 9:56 am

I'd suggest re-registering the .NET Framework 2.0, then configuring the Vault GUI Client to use the .NET 2.0 Framework.

The register the .NET Framework:

Use the utility aspnet_regiis.exe, which is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\. The command is: aspnet_regiis.exe -i.

To specify the version of the .NET Framework used by the Vault GUI Client, edit the VaultGUIClient.exe.config file in the Vault Client directory. Details here:

http://support.sourcegear.com/viewtopic.php?t=4354
Linda Bauer
SourceGear
Technical Support Manager

anthonyrstevens
Posts: 3
Joined: Wed Mar 15, 2006 3:14 pm

Problem solved

Post by anthonyrstevens » Thu Mar 23, 2006 6:28 pm

I unregistered and removed all of the following items and reinstalled them:

.NET 2.0 Framework
.NET 1.1 Framework
SQL Server 2005 Express
Visual Studio 2005

Following that (lengthy) process, the Vault Client worked for me. I took lbauer's advice and changed the .NET Framework version to 2.0 in the config file with no additional problems.

I think the root cause of my problem was a previous installation of a Beta version of the .NET 2.0 framework. Just a hunch, however.

Locked