Announcement Announcement Module
Collapse Forum Guidelines

Welcome to the Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
Problems occur While sending mail with attachment on myhosting server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems occur While sending mail with attachment on myhosting server

    hi firend,
    I created website using Visual studio 2008 and SP.NET 3.5 version. uplaoding this website into myhosting server of ComputerTekk Inc domain. while sending mail from server its working fine. but sending mail with attachment its getting following error:

    Security Exception
    Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

    Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    but sending mail with attachment in localhost working fine. What to do.

    please help me.
    Thanks in advance.

  • #2
    Hi there, Rajiv. I've escalated this to our Operations team. They'll look into it as soon as possible. When I hear back from them, I'll give you a shout.

    Thanks for your patience. Cheers,


    • #3
      Hey Rajiv. Our Operations department looked into this, and tested the page in question. They highlighted this line from the full error message:
      VMS.Campaigner.sendmail.btnSubmit_Click(Object sender, EventArgs e) in sendmail.aspx.cs:71
      and said:

      In sendmail.aspx , FileUpload1.Posted on line 70 is an instance of the HttpPostedFile class. This works on the customer's localhost but not on's server (or any other) because HttpPostedFile.FileName is the fully-qualified name of the file on the client's computer.

      In other words, if C:\file.txt is uploaded, sendmail.aspx tries to attach that specific file to the email. However, doing so fails because C:\file.txt doesn't exist on the server.

      The customer should:
      1. Use HttpPostedFile.SaveAs to save the posted file to a temporary file on the server.
      2. Attach the temporary file to the email.
      3. Send the email.
      4. Delete the temporary file.