how to deploy asp.net app to server from workstation?

Discussion in 'ASP .Net' started by Rich P, Feb 11, 2009.

  1. Rich P

    Rich P Guest

    I created a simple asp.net app with a code sample I found at

    http://www.vb-tips.com/dbpages.aspx?IA=AN

    This works from visual studio (2005). My problem is when I deploy it to
    my server. I clicked on Publish and published it to a directory on the
    server where my virtual directory exists. But the app won't run. My
    problem may be with a string variable called scriptString.


    Here is the code sample (2 web pages)

    Partial Public Class _Default
    Inherits System.Web.UI.Page

    '''Form 1 Needs an imagebox on the page
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    Image1.Height = New Unit(32)
    Image1.Width = New Unit(200)
    Image1.Visible = True
    'Beneath is the Timer

    '--this commented out scriptString works on my local workstation

    'Dim scriptString As String = "<script language=JavaScript>" &
    "setclock(); function setclock(){document.images.Image1.src = " &
    "'http://localhost:4863/WebForm2.aspx';setTimeout('setclock()',1000)}</s
    cript>"

    '--I changed " scriptString " to this one for the virtual dir on my
    server where I deployed it to

    Dim scriptString As String = "<script language=JavaScript>" &
    "setclock(); function setclock(){document.images.Image1.src = " &
    "'http://notify1/aspclock/WebForm2.aspx';setTimeout('setclock()',1000)}<
    /script>"

    Page.RegisterStartupScript("setclock", scriptString)
    End Sub
    End Class

    and here is the 2nd page (WebForm2.aspx)

    Imports System.Drawing

    Partial Public Class WebForm2
    Inherits System.Web.UI.Page

    Private Sub Page_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load

    Response.Cache.SetExpires(DateTime.Now.AddTicks(500))
    Dim myForeBrush As Brush = Brushes.Black
    Dim myFont As New Font("Times New Roman", 8, FontStyle.Regular)
    Dim textHeight As Single
    Dim bm As New Bitmap(120, 20)
    Dim g As Graphics = Graphics.FromImage(bm)
    g.Clear(Color.White)
    Dim textSize As SizeF = g.MeasureString(Now.ToString, myFont)
    g.DrawString(Now.ToString, myFont, myForeBrush, _
    New RectangleF(0, 0, 120, 20))
    Dim ms As New IO.MemoryStream
    Dim arrImage() As Byte
    bm.Save(ms, Imaging.ImageFormat.Bmp)
    arrImage = ms.GetBuffer
    Response.BinaryWrite(arrImage)
    g.dispose()
    End Sub

    End Class

    I added custom error tags in the web.config file, but I don't get any
    intuitive messages - just that the app won't run. Do I need to modify
    scriptString? My deploy string was

    \\myservername\notify\aspclock\

    the virtual dir is called notify1, so I changed scriptString to
    http//notify1/aspclock/webform2.aspx.


    thanks,
    Rich

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Rich P, Feb 11, 2009
    #1
    1. Advertisements

  2. On Feb 11, 1:00 am, Rich P <> wrote:
    >
    > I added custom error tags in the web.config file, but I don't get any
    > intuitive messages - just that the app won't run.  Do I need to modify
    > scriptString?  My deploy string was


    Set <customErrors mode="Off" /> in the web.config file, turn off
    friendly error messages in IE (Tools - Settings ...)

    http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx
    http://support.microsoft.com/kb/294807

    This should help to identify the error.
     
    Alexey Smirnov, Feb 11, 2009
    #2
    1. Advertisements

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. Mike

    deploy asp.net app

    Mike, Apr 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    427
    Martin Dechev
    Apr 5, 2004
  2. Mike

    deploy asp.net app

    Mike, Jun 2, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    556
    VB Programmer
    Jun 2, 2004
  3. Dave Diehl
    Replies:
    4
    Views:
    1,060
    Dave Diehl
    Aug 11, 2004
  4. Steven Cheng[MSFT]

    RE: deploy asp.net app

    Steven Cheng[MSFT], Aug 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    424
    =?Utf-8?B?emlubw==?=
    Aug 24, 2004
  5. =?Utf-8?B?QmlsbCBNYW5yaW5n?=

    Deploy ASP.NET App -ASP.NET Not Installed

    =?Utf-8?B?QmlsbCBNYW5yaW5n?=, Nov 24, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    943
    Eric Pearson
    Dec 16, 2005
  6. Rod
    Replies:
    2
    Views:
    2,179
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jun 7, 2006
  7. Tim Brooks
    Replies:
    4
    Views:
    3,972
    Ken Cox [Microsoft MVP]
    Jun 26, 2006
  8. Headless Rider

    Control asp.net app from other asp.net app

    Headless Rider, Aug 18, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    318
    Headless Rider
    Aug 18, 2003
Loading...