Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

I am using VS 2003, Visual basic .net. I am having a problem. When I run my program I get an 'Access denied' error message. I got a copy of Filemon for windows and its output shows that the program is looking for the necessary system dlls in this programs application directory, which is on the 'e:' drive, instead of looking for them in c:\winnt\system32.

 

Can anyone tell me why this is happening?

 

Thanks

 

Lou

Posted
I doubt the error is caused by this but which dlls is it looking for on e: ?

Also when you run your application what line of code produces the error? Any chance you could post the relevant code sections?

 

This is the output from the Filemon. there are actually about 20 more dlls that it could not find.

--------------------------------------------------------

2:40:52 PM devenv.exe:2096 OPEN E:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\Microsoft.VisualBasic.pdb FILE NOT FOUND Options: Open Access: All

2:40:52 PM GetCommFromFacU:296 OPEN E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml SUCCESS Options: Open Access: All

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml SUCCESS Length: 1066

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml SUCCESS Length: 1066

2:40:52 PM GetCommFromFacU:296 READ E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml SUCCESS Offset: 0 Length: 4096

2:40:52 PM GetCommFromFacU:296 READ E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml END OF FILE Offset: 1066 Length: 4096

2:40:52 PM GetCommFromFacU:296 READ E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml END OF FILE Offset: 1066 Length: 4096

2:40:52 PM GetCommFromFacU:296 CLOSE E:\Visual Studio Projects\GetCommFromFacUrl\bin\GetFacilityFromURL.xml SUCCESS

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\ws2_32.dll FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\ws2_32.dll FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\WS2HELP.DLL FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\WS2HELP.DLL FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\wship6.dll FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\wship6.dll FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\MLANG.dll FILE NOT FOUND Attributes: Error

2:40:52 PM GetCommFromFacU:296 QUERY INFORMATION E:\Visual Studio Projects\GetCommFromFacUrl\bin\MLANG.dll FILE NOT FOUND Attributes: Error

------------------------------------------------------------

 

I think that it has something to do with msxml4.dll, but I cannot explain why.

This program worked until somehow the library type was not valid, and I had to regsvr32 msxml.dll so that the project could find it. Here is the code. I admit to being new to .Net, and to XML and SOAP, etc, so the code is probably a mix match of old and new technology....but it worked ok until the library type problem.

 

Dim XmlRequest, XMLResponse As String

Dim ResponseDoc As New XmlDocument

Dim http As MSXML2.ServerXMLHTTP40 = New MSXML2.ServerXMLHTTP40

 

Dim Requestdoc As MSXML2.DOMDocument40 = New

MSXML2.DOMDocument40

Dim myXmlDocument As XmlDocument = New XmlDocument

 

ServiceURL = "http://" & SrvName & "/eRoomXML/Site"

 

Try

myXmlDocument.Load("GetFacilityFromURL.xml")

'Modify the XML document, change the name of the Facility to find

Dim nodeList As XmlNodeList =

myXmlDocument.GetElementsByTagName("er:Facility")

Dim node As XmlNode

Dim node2 As XmlNode

For Each node In nodeList

node.Attributes("er:include").Value = "[urlName=" &

FacName & &quot]"

Next

 

Requestdoc.loadXML(myXmlDocument.InnerXml)

' do not need this anymore

myXmlDocument = Nothing

 

'prep the http

http.open("POST", ServiceURL, False, txtSiteLoginName.Text,

txtPassword.Text)

http.setRequestHeader("Content-Type", "text/xml")

http.setRequestHeader("Content-Length", "" & Len(XmlRequest))

 

'send the request

http.send(Requestdoc)

------------------------------------------------------------------

the last line is where the try catch comes in and the ex.message is "Access denied"

 

Like I said, it worked fine at one time.

 

Thanks

 

Lou

Posted

Working now

 

I am not sure why I got one reply, that I replied to, that was not followed up on again by that first person...even just to say "I haven't the foggest idea!".

 

But anyway....

 

I am using VMWARE, (Love it), and am able to quickly recreate my environment, a Win 2000 system. First I updated the system with the latest security patches, (possibly not needed). Then I added the following entries to the registry...

-----------------

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion]

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings]

"Security_HKLM_only"=dword:00000001

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones]

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]

@=""

"1601"=dword:00000000

------------------------------------

Rebooted the system

brought my code over

ran it

 

It works!

 

Those registry keys are specific to MSXML4 SP2. They allow you to use ServerXMLHTTP post with msxml2 sp2.

 

Note: If I changed my project to reference msxml3 instead of 4, and I changed my code to use ServerXMLHTTP30 instead of ServerXMLHTTP40, and Domdocument30 instead of domdocument40, there were no problems.

The problems were when using msxml4, which is now corrected.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...