Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web service does not show up while adding web reference

Reply
Thread Tools

Web service does not show up while adding web reference

 
 
Kiran
Guest
Posts: n/a
 
      08-21-2003
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


 
Reply With Quote
 
 
 
 
MS News \(MS ILM\)
Guest
Posts: n/a
 
      08-21-2003
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
>
>



 
Reply With Quote
 
 
 
 
Kiran
Guest
Posts: n/a
 
      08-21-2003
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
>>
>>

>
>
>.
>

 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      08-22-2003
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/se...s/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."




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom WSDL, Error while adding as web reference MD ASP .Net Web Services 1 12-06-2007 11:40 PM
vs2005 consuming web service, adding web reference ? only_me ASP .Net Web Services 2 09-25-2005 12:46 PM
problem while adding web reference Ravi ASP .Net Web Services 5 02-05-2005 03:03 PM
Mozilla's javascript console show the following warning while IEdoesn't show it? nick Javascript 3 06-15-2004 07:16 PM
Adding a web reference to a java web service wawa_piggy ASP .Net Web Services 5 04-22-2004 02:54 PM



Advertisments