+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    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

  2. #2
    ΜΟΛΩΝ ΛΑΒΕ no1_vern's Avatar
    Join Date
    Apr 2002
    Location
    Albany, Ga.
    Posts
    18,484
    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.

    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

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

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews