Thread: .Net DLL security nightmare
-
April 27th, 2009, 10:24 PM #1Junior Member
- Join Date
- Apr 2009
- Posts
- 1
.Net DLL security nightmare
Hi u all!!!
I have a website, dedicated to beauty products for women, ok? Sometime ago a friend of mine told me "hey! why donīt you send that info through MSN?". I liked that, so I downloaded an autoresponder code from here:
Auto-Responder Add-in for Windows Live Messenger : Keyvan Nayyeri
So I simply added this routine to get search results from my site:
So when somebody asks for some product, the addin (working on one of my pcs) do a search on my site, get the results and send īem in response as plain text.Code:public string ConsultarSitio() { string reader = ""; string search = "[the received message text goes here]"; string url = "[the URL of my website search page]?query="+ search; try { WebPermission pWeb = new WebPermission(NetworkAccess.Connect, url); SecurityPermission pSec = new SecurityPermission(SecurityPermissionFlag.AllFlags); PermissionSet set = new PermissionSet(PermissionState.None); set.AddPermission(pWeb); set.AddPermission(pSec); set.Assert(); HttpWebRequest URLReq = (HttpWebRequest)WebRequest.Create(url); URLReq.Credentials = CredentialCache.DefaultCredentials; URLReq.AuthenticationLevel = System.Net.Security.AuthenticationLevel.None; URLReq.AllowAutoRedirect = true; URLReq.Timeout = 60000; HttpWebResponse URLRes = (HttpWebResponse)URLReq.GetResponse(); Encoding enc = Encoding.GetEncoding(1252); StreamReader sStream = new StreamReader(URLRes.GetResponseStream(), enc); reader = sStream.ReadToEnd(); } catch (Exception ex) { reader = ex.Message ; } return (reader); }
Well, instead of that, all I get is this:
I read about gacutil, regasm, caspol, trust zones, trusted assembly, security zones...... but donīt have a clue where to start to get rid of this thing, really.Code:"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Any help is truly appreciated
Txs in adv
Ariel
-
April 27th, 2009, 11:29 PM #2
Hi Ariel! Welcome to TechIMO. I hope your enjoying our community section, but I need to mention that you should have posted this in the Webmastering and Programming - Tech Support Forums - TechIMO.com forum.
Im sorry I cant help, I hope someone else is.
VernThey say technology slows down for no one. I know it outruns my wallet. I figure its because my wallet isn't light enough yet.
TechIMO Folding@home Team #111 - Crunching for the cure!
dulce bellum inexpertis
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Microsoft.Net Framwork cannot access .dll file
By Mombo323 in forum Applications and Operating SystemsReplies: 1Last Post: May 29th, 2006, 10:19 AM -
No Internet after WinXP msgina.dll & shlwapi.dll fix
By Brooklyn South in forum Networking and InternetReplies: 1Last Post: April 16th, 2005, 10:05 PM -
wireless net work login /security
By djm1k0 in forum Networking and InternetReplies: 1Last Post: March 21st, 2005, 07:43 AM -
Visual Basic .Net - DLL file question
By firewolf in forum Applications and Operating SystemsReplies: 15Last Post: September 17th, 2003, 10:25 PM -
Security on the Net
By crouse in forum Security and Privacy IssuesReplies: 1Last Post: April 23rd, 2003, 02:49 PM



LinkBack URL
About LinkBacks



Reply With Quote

mwatch epic online Scary Pic Screenwriters Jason Friedberg And Aaron Seltzer Work To Parody The "Biggest" Movies Ever To Hit The Silver Screen During This Comedy That Offers Such Fashionable...
watch epic online