Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / June 2006

Tip: Looking for answers? Try searching our database.

Confusing networking exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeffery Jones - 30 Mar 2006 15:48 GMT
Given - .NET 2.0,   App 1 creates a TCP listening socket on 127.0.0.1
App 2 connects to the same socket on 127.0.0.1.

All works fine until the app is installed on another machine without
Visual Studio.  Then the connecting client gets -

----  UnauthorizedAccessException   ---------
Message: Access to the path 'Global\.net clr networking' is denied.
  at System.Net.Sockets.TcpClient.Connect(String hostname, Int32
port)

 The code was
               remoteClient.Connect("127.0.0.1", RemotePort);


This *seems* like a Code Access Security - type of problem, except
that the app is installed and running on the C: drive.   There is no
.NET 2.0 Framework configuration applet to even view what the
workstation settings are - they are as defaulted from installation.

  What could be happening?   I couldn't find any reference to the
path 'Global\.net clr networking', so I don't know what this means.
"Jeffrey Tan[MSFT]" - 31 Mar 2006 03:49 GMT
Hi Jeffery,

Thanks for your post!

Based on my research regarding this exception, I did not find much useful
information. My finding appears that 'Global\.net clr networking' is an
internal mutex string which is used in .Net networking. However, this
information is not enough for us to identify the problem.

Have you tried the applications on other machines without VS2005 installed?
Does the problem still exist?

Can you provide the full call stack regarding this exception?

Additionally, if you think this issue should be caused by CAS. You can open
.Net Framework2.0 SDK command prompt, and use caspol.exe -s off to turn off
the machine's CAS temporarily.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jeffery Jones - 03 Apr 2006 09:33 GMT
>Based on my research regarding this exception, I did not find much useful
>information. My finding appears that 'Global\.net clr networking' is an
[quoted text clipped - 3 lines]
>Have you tried the applications on other machines without VS2005 installed?
>Does the problem still exist?

  Jeffery,  The information that it is a mutex string is helpful and
I performed some additional tests to try to get more information.

On a second system,   XP Home without  VS2005 - Application works.

>Can you provide the full call stack regarding this exception?

ExceptionType: UnauthorizedAccessException
HelpLine:
Message: Access to the path 'Global\.net clr networking' is denied.
StackTrace:    at System.Net.Sockets.TcpClient.Connect(String
hostname, Int32 port)
  at RemoteInterop.RemoteInterface.ConnectToMasterController()
  at RemoteInterop.RemoteInterface.StartDownload(String profileName)
  at StartDownload.Program.Main(String[] args)
TargetSite: Void Connect(System.String, Int32)

  The client socket gets as far as the network connect because the
server socket sees a connect, followed by an immediate disconnect
without any data.

>Additionally, if you think this issue should be caused by CAS. You can open
>Net Framework2.0 SDK command prompt, and use caspol.exe -s off to turn off
>the machine's CAS temporarily.

  Here's where it gets interesting.   The system with the problem is
Windows 2000 Professional with the login having only normal user
privileges (not administrator).   Caspol.exe doesn't run in the normal
user account, so we logged in as administrator.  The application then
worked without the Caspol.exe setting.   So it seems that a normal
Windows 2000 user account lacks some privilege required for access to
the mutex 'Global\.net clr networking'.

  I created a 'limited user account' on Windows XP Home, but the
application works there, so I was unable to narrow the issue further.

  How do I find out what privilege is required for a limited Windows
2000 user to access the mutex 'Global\.net clr networking' ?

  Thanks,

  Jeffery
"Jeffrey Tan[MSFT]" - 04 Apr 2006 10:33 GMT
Hi Jeffery ,

Thanks for your feedback.

I will do some consulting internally to see if we can find more information
regarding your problem. I will reply to you ASAP. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeffrey Tan[MSFT]" - 06 Apr 2006 10:22 GMT
Hi Jeffery,

Sorry for letting you wait.

The feedback from our product team indicates that "Global\.net clr
networking" is a reference to the perf counter (that's the name of the perf
counter).

However, without reproducing this problem, it is hard for us to identify
the root cause of the problem.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jeffery Jones - 27 Apr 2006 08:43 GMT
>Have you tried the applications on other machines without VS2005 installed?
>Does the problem still exist?
>
>Can you provide the full call stack regarding this exception?

More information -
    1.)  The socket server task also dumped with a much more
informative stack trace.   This is included below.
  2.)  Someone else had the problem and posted in this newsgroup. The
only thing in common was German Language, Windows 2000, and running as
an ordinary user.   They solved their problem by going to XP.

   Eventually, more people will encounter this problem.  A
shrinkwrapped app cannot require the user to upgrade to XP.   Perhaps
the shrinkwrap vendor can revert to the ugly mode and say 'our app
requires administrator privilege under Windows 2000'.

----------------------------------------------------------------------------------
ExceptionType: UnauthorizedAccessException
HelpLine:
Message: Access to the path 'Global\.net clr networking' is denied.
StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
  at System.Threading.Mutex.<>c__DisplayClass3.<.ctor>b__0(Object
userData)
  at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
  at System.Threading.Mutex..ctor(Boolean initiallyOwned, String
name, Boolean& createdNew, MutexSecurity mutexSecurity)
  at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String
mutexName, Mutex& mutex)
  at
System.Diagnostics.SharedPerformanceCounter.Verify(CategoryEntry*
currentCategoryPointer)
  at
System.Diagnostics.SharedPerformanceCounter.FindCategory(CategoryEntry**
returnCategoryPointerReference)
  at System.Diagnostics.SharedPerformanceCounter.GetCounter(String
counterName, String instanceName, Boolean enableReuse,
PerformanceCounterInstanceLifetime lifetime)
  at System.Diagnostics.SharedPerformanceCounter..ctor(String
catName, String counterName, String instanceName,
PerformanceCounterInstanceLifetime lifetime)
  at System.Diagnostics.PerformanceCounter.Initialize()
  at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)
  at System.Net.NetworkingPerfCounters.Initialize()
  at
System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection
section)
  at System.Net.Configuration.SettingsSectionInternal.get_Section()
  at System.Net.Sockets.Socket.SetToConnected()
  at System.Net.Sockets.Socket.UpdateAcceptSocket(Socket socket,
EndPoint remoteEP, Boolean needCancelSelect)
  at System.Net.Sockets.Socket.Accept()
  at System.Net.Sockets.TcpListener.AcceptTcpClient()
  at mcSimulator.RemoteControl.RemoteServerThread()

TargetSite: Void WinIOError(Int32, System.String)
"Jeffrey Tan[MSFT]" - 02 May 2006 10:25 GMT
Hi Jeffery,

Do you have the definite steps to reproduce the problem? If so, I suggest
you report it as a bug in the feedback link below:
http://lab.msdn.microsoft.com/productfeedback/default.aspx

Our product team will receive the bug request work with you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jeffery Jones - 08 May 2006 12:32 GMT
>Do you have the definite steps to reproduce the problem? If so, I suggest
>you report it as a bug in the feedback link below:
>http://lab.msdn.microsoft.com/productfeedback/default.aspx

  I'll set this up.  Thanks for the reporting address!
"Jeffrey Tan[MSFT]" - 09 May 2006 04:12 GMT
You are welcome.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Paul Horstink - 12 Jun 2006 10:51 GMT
Dear Jeffrey,

I have the same error on a Windows2000 system with regular user-account (I'm
not doing a 'connect' but I use try to consume a web-service).
Anyway, I also saw a message related to the messages realted to the
performance counter.
Has a solution been found already? Was it a bug? How do I get a solution?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.