Server Application Unavailable / Server Error

Discussion in '.NET' started by hutty, Sep 11, 2006.

  1. hutty

    hutty

    Joined:
    Sep 11, 2006
    Messages:
    2
    I've been spinning my wheels for four days trying to figure out granting permission to website. I'm running IIS 5.1 on Windows XP and using SQL 2005 Express. I'm currently getting an error "Server Error in "test' Application.

    Before commenting out a command that ran a DTS script I would get the error "Server Application Unavailable.

    I've pretty much granted access all over the place for the ASPNET account. Tried impersonating with my personal user credentials. Still getting errors. I've read many articles over past few days but no success. Any ideas?
    hutty, Sep 11, 2006
    #1
    1. Advertising

  2. hutty

    hutty

    Joined:
    Sep 11, 2006
    Messages:
    2
    After applying security in certain areas, it appears the error has been been isolated to a particular code involving sending email from the server. While on the server the webapp execute as plan, except that at the end I get "page cannot be displayed". Where I should be seeing the web form.

    When running code remotely I get the errors server unavailable or server error in application. Everything works accordingly up until sending email. I'm sure it's an access problem. Here's what i have on the code for sending email.

    Dim username As String
    username = User.Identity.Name
    Dim msg As New System.Net.Mail.MailMessage()
    Dim attachFile As New Attachment("D:\Inetpub\wwwroot\SysChanges\Center\center.txt")
    Dim userid As String
    Dim smtp As New System.Net.Mail.SmtpClient("smtp.domain.com")

    userid = Right(username, 6)

    Dim Fromname As String = (userid + "@domain.com")

    Dim Toname As String = "hutty@domain.com"


    msg.From = New System.Net.Mail.MailAddress(Fromname)
    msg.To.Add(New System.Net.Mail.MailAddress(Toname))
    msg.Subject = "Center Add/Change Request"


    'Message.UrlContentBase = url
    msg.Body = Fromname + " " + "has submitted the following request for processing:"
    msg.Attachments.Add(attachFile)
    smtp.Send(msg)
    hutty, Sep 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Cox [Microsoft MVP]
    Replies:
    4
    Views:
    5,606
    Ken Cox [Microsoft MVP]
    Aug 28, 2003
  2. Matthew Louden

    Run-time error: Server Application Unavailable

    Matthew Louden, Oct 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,148
    Oliver
    Oct 22, 2003
  3. Keith
    Replies:
    1
    Views:
    3,432
  4. Umair Ahmed

    Server Application unavailable Error

    Umair Ahmed, Dec 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,142
    zmbharmal
    Apr 22, 2009
  5. Robert Halford
    Replies:
    1
    Views:
    4,607
    David Lloyd
    May 13, 2005
Loading...

Share This Page