Web service does not show up while adding web reference

Discussion in 'ASP .Net' started by Kiran, Aug 21, 2003.

  1. Kiran

    Kiran Guest

    Hi,
    If I create a Virtual directory with application name
    programmatically it will not show up in the available web
    services while adding web reference(Dynamic discovery
    fails).

    Where as if I create the virtual directory manually it
    will shown up while adding web reference.

    I have used the following code to create it
    programmatically on IIS 5.0

    I have checked the property pages of virtual directory
    created using both the methods they look same.

    Set IIsWebVDirRootObj = GetObject
    ("IIS://LocalHost/W3SVC/1/Root")
    Set IIsWebVDirObj = IIsWebVDirRootObj.Create
    ("IIsWebVirtualDir", "MySecureAPP")

    IIsWebVDirObj.Put "Path", "C:\MySecure"
    IIsWebVDirObj.Put "AccessRead", True
    IIsWebVDirObj.Put "AccessScript", True
    IIsWebVDirObj.Put "AppIsolated",2

    IIsWebVDirObj.AppCreate2 1
    IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
    IIsWebVDirObj.SetInfo



    Thanks
    Kiran
     
    Kiran, Aug 21, 2003
    #1
    1. Advertising

  2. Just wondering is this in WSH?
    What Language?

    "Kiran" <> wrote in message
    news:011501c36807$f4561d90$...
    > Hi,
    > If I create a Virtual directory with application name
    > programmatically it will not show up in the available web
    > services while adding web reference(Dynamic discovery
    > fails).
    >
    > Where as if I create the virtual directory manually it
    > will shown up while adding web reference.
    >
    > I have used the following code to create it
    > programmatically on IIS 5.0
    >
    > I have checked the property pages of virtual directory
    > created using both the methods they look same.
    >
    > Set IIsWebVDirRootObj = GetObject
    > ("IIS://LocalHost/W3SVC/1/Root")
    > Set IIsWebVDirObj = IIsWebVDirRootObj.Create
    > ("IIsWebVirtualDir", "MySecureAPP")
    >
    > IIsWebVDirObj.Put "Path", "C:\MySecure"
    > IIsWebVDirObj.Put "AccessRead", True
    > IIsWebVDirObj.Put "AccessScript", True
    > IIsWebVDirObj.Put "AppIsolated",2
    >
    > IIsWebVDirObj.AppCreate2 1
    > IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
    > IIsWebVDirObj.SetInfo
    >
    >
    >
    > Thanks
    > Kiran
    >
    >
     
    MS News \(MS ILM\), Aug 21, 2003
    #2
    1. Advertising

  3. Kiran

    Kiran Guest

    This is VbScript that uses ADSI objects.
    I have tried with C# too, but the same problem exiits

    C# Code
    DirectoryEntry IISRoot = new DirectoryEntry("IIS://" +
    m_strServer + "/W3SVC/1/Root");
    DirectoryEntry newDir =
    IISRoot.Children.Add( m_strVDirName, "IIsWebVirtualDir");
    newDir.Properties["Path"]
    [0] = m_strVDirPath;
    newDir.Properties
    ["AccessFlags"][0] = "513";
    newDir.Properties
    ["AppIsolated"][0] = "2";
    //newDir.Properties
    ["AccessWrite"][0] = "True";
    newDir.Properties
    ["AppFriendlyName"][0] = m_strVDirName;
    newDir.Invoke
    ( "AppCreate", true );
    newDir.CommitChanges();

    Thanks
    Kiran


    >-----Original Message-----
    >Just wondering is this in WSH?
    >What Language?
    >
    >"Kiran" <> wrote in message
    >news:011501c36807$f4561d90$...
    >> Hi,
    >> If I create a Virtual directory with application name
    >> programmatically it will not show up in the available

    web
    >> services while adding web reference(Dynamic discovery
    >> fails).
    >>
    >> Where as if I create the virtual directory manually it
    >> will shown up while adding web reference.
    >>
    >> I have used the following code to create it
    >> programmatically on IIS 5.0
    >>
    >> I have checked the property pages of virtual directory
    >> created using both the methods they look same.
    >>
    >> Set IIsWebVDirRootObj = GetObject
    >> ("IIS://LocalHost/W3SVC/1/Root")
    >> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
    >> ("IIsWebVirtualDir", "MySecureAPP")
    >>
    >> IIsWebVDirObj.Put "Path", "C:\MySecure"
    >> IIsWebVDirObj.Put "AccessRead", True
    >> IIsWebVDirObj.Put "AccessScript", True
    >> IIsWebVDirObj.Put "AppIsolated",2
    >>
    >> IIsWebVDirObj.AppCreate2 1
    >> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
    >> IIsWebVDirObj.SetInfo
    >>
    >>
    >>
    >> Thanks
    >> Kiran
    >>
    >>

    >
    >
    >.
    >
     
    Kiran, Aug 21, 2003
    #3
  4. Kiran

    MSFT Guest

    Did you have any asmx files in the Virtual folder? Additionally, What did
    you mean "Dynamic discovery", "Browse to
    Web services on the local machine " in VS.NET 2003?

    Luke

    "Microsoft Security Announcement: Have you installed the patch for
    Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
    you to review the information at the following link regarding Microsoft
    Security Bulletin MS03-026
    http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
    visit Windows Update at http://windowsupdate.microsoft.com to install the
    patch. Running the SCAN program from the Windows Update site will help to
    insure you are current with all security patches, not just MS03-026."
     
    MSFT, Aug 22, 2003
    #4
    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. wawa_piggy

    Adding a web reference to a java web service

    wawa_piggy, Apr 19, 2004, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    192
    Dino Chiesa [Microsoft]
    Apr 22, 2004
  2. only_me

    vs2005 consuming web service, adding web reference ?

    only_me, Sep 20, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    217
    only_me
    Sep 25, 2005
  3. Replies:
    1
    Views:
    250
  4. nick
    Replies:
    3
    Views:
    413
    Grant Wagner
    Jun 15, 2004
  5. greenflame
    Replies:
    6
    Views:
    178
    greenflame
    Jun 18, 2005
Loading...

Share This Page