Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > inetserver iis > june 2005 >

inetserver iis : Site ID number generate


Kristofer Gafvert [MVP]
6/30/2005 3:48:51 AM
Hello,

No, you do not need the ID to create a new website. You should use
CreateNewSite when creating new websites in IIS 6.0.

I have an example here (using C#):
http://www.gafvert.info/notes/CreateWebSiteIIS6.htm

Also see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/8e21a914-a55c-44b5-9e06-e5aa15970454.asp


--
Regards,
Kristofer Gafvert (IIS MVP)
www.gafvert.info - My Articles and help
www.ilopia.com


[quoted text, click to view]
Darko Bazulj
6/30/2005 12:28:13 PM
Hi,

IIS 6
VB.NET

How to generate SiteID like it is generated when I create site with
iisweb.vbs or from IIS Manager.

It is some hash function of ServerComment, I read about that.
But I don't know how to achive that, I searh a lot but didn't find
examples.


I need only SiteID number.

Thanks for help.

Regards,
Darko Bazulj
Darko Bazulj
7/1/2005 12:00:00 AM
Hi Wei-Dong XU,

Why I need only IDs?

I have many sites with old IDs (2,3,4,5,6,7,8,9,10,11,12,13 and etc.)
This are sites which I migrate from IIS5.
All new sites which are open on IIS6 are OK.

I want to replace old IDs with new (unique)IDs.
Is it possible to get only IDs?

or is there some script which can replace old IDs with IIS6 IDs?

Thanks for help.


Regards,
v-wdxu NO[at]SPAM online.microsoft.com
7/1/2005 12:49:43 AM
Hi Darko,

The siteID is generated by IIS. At IIS6.0, the site id is ensured by t he
IIS be unique among the sites. So for the site creation, we will only need
to specify the new web site name. I'd suggest please reference the sample
from Kristofer to create the site.

Please feel free to let me know if you have any question. It is my pleasure
to be of any assistance.

Best Regards,
Wei-Dong XU
Microsoft Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.

David Wang [Msft]
7/3/2005 7:06:12 PM
IDs are arbitrary numbers. The "new" IDs of IIS6 are just as arbitrary as
the "old" IDs.

So, from a functional perspective, both old and new IDs are just fine.

Thus, there is no function for you to call to just generate the Site IDs
like IIS6, and there is only one API call that will generate a SiteID along
with the website.

What you can do is:
1. Migrate old websites with old IDs
2. Enumerate the old website IDs and related Server Comment
3. Call CreateNewWebsite with the ServerComment to generate the new ID
4. Call ADSUTIL.VBS MOVE W3SVC/OldID# W3SVC/NewID#

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
[quoted text, click to view]
Hi Wei-Dong XU,

Why I need only IDs?

I have many sites with old IDs (2,3,4,5,6,7,8,9,10,11,12,13 and etc.)
This are sites which I migrate from IIS5.
All new sites which are open on IIS6 are OK.

I want to replace old IDs with new (unique)IDs.
Is it possible to get only IDs?

or is there some script which can replace old IDs with IIS6 IDs?

Thanks for help.


Regards,
Darko Bazulj

Darko Bazulj
7/4/2005 12:57:22 PM
Hi David,

I will do something like that.
Thanks for good suggestion.

Regards,
Darko Bazulj
7/5/2005 12:00:00 AM
Hi David,

I'am trying to write function to create site in VB.NET like Kristofer in C#
but I always get errors.

Can you write simple example in vb.net, please.

Thank you for help.

Regards,
Kristofer Gafvert [MVP]
7/5/2005 1:02:10 PM
It is just a matter of getting the syntax right.

Anyway, i uploaded an example using VB.NET here:

http://www.gafvert.info/notes/VBNET-Create-Website-IIS6.htm


--
Regards,
Kristofer Gafvert (IIS MVP)
www.gafvert.info - My Articles and help
www.ilopia.com


[quoted text, click to view]
Darko Bazulj
7/7/2005 9:07:25 AM
Hi Kristofor,

It works.

Thank you for help.

Regards,
AddThis Social Bookmark Button