Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2008, 11:11 PM
Registered User
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How can i create subdomain dynamically using classic ASP code like username.domainname.com
Can anyone help me.

Thanks in advance

 
Old April 19th, 2008, 07:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Surjit,

Aren't the answers to that question in this post, and the other code you posted in a different thread?

Your code is probably fine, but the user account to execute it (probably IUSR_MachineName) doesn't have the necessary permissions to execute it.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old April 21st, 2008, 12:13 AM
Registered User
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar,

  I really appreciate your help, can you explain me in details.
   Actually i want to create subdomain dynamically using ASP Code and i am facing the error here.Please advice.

'Setup Connections To IIS
set locatorObj = CreateObject("WbemScripting.SWbemLocator")
set providerObj = locatorObj.ConnectServer(strServer,"root/MicrosoftIISv2")
set serviceObj = providerObj.Get("IIsWebService='W3SVC'")

it give error
SWbemLocator error '80041003'
Access denied

And when i pass the Username and password for web Server
set providerObj = locatorObj.ConnectServer(strServer, "root/MicrosoftIISv2",strUser, strPassword)

it give error
SWbemLocator error '80041064'

User credentials cannot be used for local connections

Thanks,
Surjit


 
Old April 21st, 2008, 12:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Like I said, make sure that the account that executes this code has sufficient permissions. It's not about setting permissions for the site you are creating; it's about permissions for the code that creates the site.

You may want to take a look here for some ideas: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=290

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to maintain session between Domain &subdomain im.imrankhan PHP How-To 1 September 5th, 2008 12:44 PM
Error giving when i create the Subdomain Surjit Classic ASP Professional 0 April 18th, 2008 06:17 AM
Create generic XSL Template to create table Venkatachalapathy XSLT 5 March 11th, 2008 07:49 AM
create subdomain keyvanjan ASP.NET 1.0 and 1.1 Professional 8 February 20th, 2006 05:44 AM
how to create editor ibrahim C# 2 December 17th, 2003 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.