hi all,
i'm looking for solution to this problem - i host winform control.dll in IE. As soon as this dll is created, it tries to connect to server where it's loaded from to read configuration file control.config.xml and to connect to remote object through .net remoting.
Problem is in permissions - how to give programmaticaly permissions (if it's ever possible), or what to do to successfully read config and then to be able to connect (=>serialization and probably more permissions) this probably will have to be set by installation process, am i right
When i run on local machine, everything works fine, but not from remote computer. I added my server on client's machine to trusted sites, so i think, for me as a client is everything ok, but there's problem from server's point of view...am i right
i found few discussion about this topic, but i could find any final advice. Can anybody help pls
thanks a lot,
Lubos

Permissions for dll hosted in IE
LTR
Hi Lubos
Your post don’t clearly explain the actual scenario you have, but I am assuming that you are talking about the hosting your DLL in the IIS and getting some permission error.
· Please make sure that DLL and CONFIG files are in same folder.
· IIS virtual directory Execute Permission is configured to Scripts and Configurable
· Try giving access to IIS_WPG & Internet guest account user to the folder in which your DLL exist.
· If you are under proxy server then make sure that if you are connecting to some port via remoting is not blocked by the server.
It would be easier to find out problem if you give some more technical details regarding deployment cenario and platforms you are using.
Laurence Starks MSFT
hi,
thanks for reply! i'll try to explain it better.
1. on a server is running windows service as a core process. it listens on a some port (2000) to remoting calls - it's remoting server
2. then i have web application running on IIS (80 port). it hosts web pages as well as remote object which acts as proxy for remote calls. iis listens to web request for pages as wel as for remoting calls. when gets remoting requests, sends it to remote object and this object opens a connection to remoting server on 2000 and resend this request. On iis is also web page (Control.aspx) where is managed dll (winform control graphics.dll, contains just one button) embedded. This dll acts as remoting client (sends remote requests to iis and waits for response). In a folder with web page is contained also graphics.dll and all dlls which the first one depens on and also configuration file.
So when client asks for Control.aspx, then graphics.dll (and dependencies) are downloaded and it's shown in a web page. then i click on button inside the graphics.dll. As a reaction to click, i look into config file for some parameters and all method GetServiceName() to the remote proxy on iis. it resends it to remote server and response sends back, so i retrieve string from remote srever.
The point is that when i run it on local machine - i mean client is on same machine as IIS is running on - then it works fine (i added myIp/WebApp among trusted sites), but when i connect to my PC from another computer, i can see graphics.dll, but i get ConfigurationException and i suppose there'd be more (SerializationException,..) despite setting my server as trusted site on 2nd pc.
So my question is, how to set permissions to be able to run it successfully. As i read, problem is that ,even if dll was strongly signed, the call stack contains AppDomain of IE process, which has emmbeding this control and its right are low...
thanks for any help
Lubos
Penicillin
Hi,
Yes you can do that, What you have to do is…
Step 1. Identify the Permissions Your Application Needs
Step 2. Choose an Appropriate Trust Level
Step 3. Configure Your ASP.NET Application
Step 4. Optionally Create a Custom Trust Level
See the article to know how to do that…
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnpag2/html/PAGHT000017.asp
Jerrie Pelser
hi,
thanks for reply. I followed the link. If i understand it right, then when i set web.config like
<
location allowOverride="false"><
system.web><
trust level="Low" originUrl="" /></
system.web></
location>it means, that web app process will have permission set belonging to "Low" and it also means that this process will require at least the same permissions to access its resources. am i right or totally out
However, when i decrease trust level, then i'm forbidden to do some actions like subscribing for Application_BeginRequest events in my http module, referencing some assemblies requiring full trust and so on.
So, is there any way how to increase trust level for dll running in IE process
Maybe i completely misunderstood it... Let me know please.
Regards
Lubos
Gary_MN
Hi Lubos,
Ok thanks i think i got your point. Please follow the steps on the given below link...
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a55fb31b-5b42-476d-9cae-050ab3fae307.mspx mfr=true
Hope that helps you.
spidey_witnesssss
hi,
it's exactly what i needed. it helped me to understand.
Thanks a lot for your time!
Lubos