Deploying Custom Server Control

Discussion in 'ASP .Net Web Controls' started by Chris McKenzie, Feb 12, 2004.

  1. I have a server control that I've developed that depends on some pretty
    sophisticated and lengthy javascript. I have the javascript as part of the
    Server Control Project. Can anyone point me to any resources telling me how
    to build a deployment project for such a control that will place the
    javascript in the IIS Script folder?

    Thanks,
    Chris
     
    Chris McKenzie, Feb 12, 2004
    #1
    1. Advertising

  2. hi Chris,
    IIS script folder ? Are you serious. You want permission to write to a
    clients IIS script folder. Not very nice. I'm not sure your clients will
    like that, if you do find a way to get it there. I'm not going to like this
    at all if a custom control i purchased dumped their script files into my IIS
    script folder, needless to say giving them read/write permissions to my IIS
    script folder in the first place ;P


    Quick copy and paste from the docs :

    Deploying a Script File
    The script block emitted by a script-enabled control can contain inline
    script, or it can provide the location of a script file. Both cases are
    shown in the sample discussed earlier in this topic. If the block provides
    the location of a script file, you must deploy the script file in such a
    manner that it can be used from other applications and does not create
    versioning conflicts. In the sample, the script file is placed in a
    subdirectory named script in the Web application's virtual rooted directory.

    [C#]
    // Provides the location of the script file.
    location = Page.Request.ApplicationPath + "/script/";
    [Visual Basic]
    ' Provides the location of the script file.
    location = Page.Request.ApplicationPath & "/script/"
    While this location works for the sample, the recommended location of a
    script file that is intended for use by other applications is as follows.

    /aspnet_client/<your assembly name>/<your assembly version>/
    The directory aspnet_client is a virtual rooted Web application directory
    that is created on your computer when you install the .NET Framework SDK or
    Visual Studio .NET. For example, the script files that ship with ASP.NET are
    in the following location.

    /aspnet_client/system_web/<version of SDK installed>
    If you have multiple versions of the SDK installed, you will see multiple
    subdirectories under aspnet_client/system_web. Because a control library is
    tied to a specific version of the script file, the recommended deployment
    pattern allows different versions of a control library to run side by side.

    Note also that one aspnet_client directory is created for each Web site
    hosted on the computer. Generally a server hosts only one Web site. However,
    more than one site is permissible, and multiple sites lead to multiple
    copies of the aspnet_client directory.



    "Chris McKenzie" <> wrote in message
    news:O$...
    > I have a server control that I've developed that depends on some pretty
    > sophisticated and lengthy javascript. I have the javascript as part of

    the
    > Server Control Project. Can anyone point me to any resources telling me

    how
    > to build a deployment project for such a control that will place the
    > javascript in the IIS Script folder?
    >
    > Thanks,
    > Chris
    >
    >
     
    Alessandro Zifiglio, Feb 13, 2004
    #2
    1. Advertising

  3. Wait, you said IIS script folder. I read that correctly expect i were
    thinking something else, my apologies. All my comments were out of place ;P

    Another quick copy and paste from the docs :

    Adding and Removing Project Outputs in the File System Editor

    Deployment projects allow you to specify where the outputs of one or more
    projects in your solution will be deployed on a target computer. Outputs can
    be added to a deployment project from the File System Editor or directly
    from Solution Explorer.

    To add a project output from the File System Editor

    Select a target folder in the File System Editor.
    On the Action menu, point to Add, and then click Project Output.
    Note The Project Output command is also available from the Project menu.
    Choosing this command from the Project menu rather than the Action menu
    causes the project outputs to be placed in the Application folder rather
    than in the target folder you have selected.
    In the resulting Add Project Output Group dialog box, select a project from
    the Project list.
    Choose the type of output from the outputs list. You can select multiple
    outputs from the list.
    Note The types of outputs available are dependent on the type of project
    selected. Some projects have multiple types of outputs; others might have
    only one.
    Optionally, choose a different configuration from the Configuration list.
    To add a project output from Solution Explorer

    Select a deployment project in Solution Explorer.
    On the Project menu, point to Add, and then click Project Output.
    In the resulting Add Project Output Group dialog box, select a project from
    the Project list.
    Choose the type of output from the outputs list. You can select multiple
    outputs from the list.
    Note The types of outputs available are dependent on the type of project
    selected. Some projects have multiple types of outputs; others may have only
    one.
    Optionally, choose a different configuration from the Configuration list.
    Note Project outputs added from Solution Explorer are always placed in the
    Application Folder in the File System Editor. If you want to place outputs
    in a different folder, you must add them from the File System Editor as
    described above.
    To remove a project output

    Select the project output in the File System Editor, and choose Delete from
    the Edit menu.
    "Alessandro Zifiglio" <> wrote in
    message news:%t%Wb.6621$...
    > hi Chris,
    > IIS script folder ? Are you serious. You want permission to write to a
    > clients IIS script folder. Not very nice. I'm not sure your clients will
    > like that, if you do find a way to get it there. I'm not going to like

    this
    > at all if a custom control i purchased dumped their script files into my

    IIS
    > script folder, needless to say giving them read/write permissions to my

    IIS
    > script folder in the first place ;P
    >
    >
    > Quick copy and paste from the docs :
    >
    > Deploying a Script File
    > The script block emitted by a script-enabled control can contain inline
    > script, or it can provide the location of a script file. Both cases are
    > shown in the sample discussed earlier in this topic. If the block provides
    > the location of a script file, you must deploy the script file in such a
    > manner that it can be used from other applications and does not create
    > versioning conflicts. In the sample, the script file is placed in a
    > subdirectory named script in the Web application's virtual rooted

    directory.
    >
    > [C#]
    > // Provides the location of the script file.
    > location = Page.Request.ApplicationPath + "/script/";
    > [Visual Basic]
    > ' Provides the location of the script file.
    > location = Page.Request.ApplicationPath & "/script/"
    > While this location works for the sample, the recommended location of a
    > script file that is intended for use by other applications is as follows.
    >
    > /aspnet_client/<your assembly name>/<your assembly version>/
    > The directory aspnet_client is a virtual rooted Web application directory
    > that is created on your computer when you install the .NET Framework SDK

    or
    > Visual Studio .NET. For example, the script files that ship with ASP.NET

    are
    > in the following location.
    >
    > /aspnet_client/system_web/<version of SDK installed>
    > If you have multiple versions of the SDK installed, you will see multiple
    > subdirectories under aspnet_client/system_web. Because a control library

    is
    > tied to a specific version of the script file, the recommended deployment
    > pattern allows different versions of a control library to run side by

    side.
    >
    > Note also that one aspnet_client directory is created for each Web site
    > hosted on the computer. Generally a server hosts only one Web site.

    However,
    > more than one site is permissible, and multiple sites lead to multiple
    > copies of the aspnet_client directory.
    >
    >
    >
    > "Chris McKenzie" <> wrote in message
    > news:O$...
    > > I have a server control that I've developed that depends on some pretty
    > > sophisticated and lengthy javascript. I have the javascript as part of

    > the
    > > Server Control Project. Can anyone point me to any resources telling me

    > how
    > > to build a deployment project for such a control that will place the
    > > javascript in the IIS Script folder?
    > >
    > > Thanks,
    > > Chris
    > >
    > >

    >
    >
     
    Alessandro Zifiglio, Feb 13, 2004
    #3
    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. =?Utf-8?B?VG9tIE4=?=

    deploying and re-deploying ASP.Net applications

    =?Utf-8?B?VG9tIE4=?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    388
    =?Utf-8?B?VG9tIE4=?=
    Feb 4, 2004
  2. Jonah Olsson
    Replies:
    1
    Views:
    580
    Scott Allen
    Apr 5, 2005
  3. DKode
    Replies:
    4
    Views:
    584
    DKode
    Nov 7, 2005
  4. Matt Sokol
    Replies:
    2
    Views:
    390
    Theo Tillotson
    Aug 7, 2003
  5. Tim
    Replies:
    0
    Views:
    205
Loading...

Share This Page