home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

.Net DLL security nightmare

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1182
Discussions: 200,929, Posts: 2,379,148, Members: 246,296
Old April 27th, 2009, 11:24 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Apr 2009
Posts: 1
Question
.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:

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);                
        }
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.

Well, instead of that, all I get is this:

Code:
"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
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.

Any help is truly appreciated

Txs in adv

Ariel
ferroariel is offline   Reply With Quote
Old April 28th, 2009, 12:29 AM     #2 (permalink)
I do Ouchy-Bleedy.
 
no1_vern's Avatar
 
Join Date: Apr 2002
Location: Albany, Ga.
Posts: 10,645
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.

Vern
__________________
They say technology slows down for no one. I know it outruns my wallet. I figure its because my wallet isn't light enough yet.
no1_vern is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft.Net Framwork cannot access .dll file Mombo323 Applications and Operating Systems 1 May 29th, 2006 11:19 AM
No Internet after WinXP msgina.dll & shlwapi.dll fix Brooklyn South Networking and Internet 1 April 16th, 2005 11:05 PM
wireless net work login /security djm1k0 Networking and Internet 1 March 21st, 2005 07:43 AM
Visual Basic .Net - DLL file question firewolf Applications and Operating Systems 15 September 17th, 2003 11:25 PM
Security on the Net crouse Security and Privacy Issues 1 April 23rd, 2003 03:49 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2868)
Obama the Muslim (14)
California Passes Anti-Flat-HDTV Le.. (39)
Is the PSU I received dead? (10)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Foreign voltage (10)
Install XP pro and a Vista laptop ?.. (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
Ideal cheap graph card for PC-Gamin.. (16)
New Computer wont recognize XP disc (7)
EVGA 9800 gtx help with finding a g.. (8)
Recent Discussions
Regular Build (3)
solutions for virtical white lines on.. (0)
Ideal cheap graph card for PC-Gaming? (16)
Graphics Card Upgrade Question (0)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Install XP pro and a Vista laptop ?? (10)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)


All times are GMT -4. The time now is 05:05 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28