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

  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. 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. Do
    Replies:
    3
    Views:
    470
    JGuyeggos
    Jan 25, 2006
  2. deko
    Replies:
    3
    Views:
    451
    Mark Rae
    Sep 5, 2004
  3. =?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:
    774
    Eric Pearson
    Dec 16, 2005
  4. ssg31415926
    Replies:
    0
    Views:
    497
    ssg31415926
    May 8, 2006
  5. =?Utf-8?B?ZXN3YW5zb24=?=

    asp.net 2.0 on a windows xp workstation

    =?Utf-8?B?ZXN3YW5zb24=?=, Jul 11, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    479
    Walter Wang [MSFT]
    Jul 14, 2006
Loading...

Share This Page