473,396 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

creating website programmatically using C#

Hi,

I have written some code in C# to programmatically create a website
and an application pool. Both seems to be getting created alright with
whatever settings I have applied. However, when I fire a request to
the website, I get a "page can not be displayed" message". I get
nothing in the event viewer logs. I read somewhere that from website
properties Home Directory Application Settings, if I remove and
recreate the application pool, website starts serving requests. This
DOES work but I am unable to figure out how to accomplish this from my
code. When I checked Metabase.XML file of IIS before and after doing
this change manually, only change I noticed that following gets added
inside <IIsWebVirtualDir>.

UNCPassword="49634462500000000600000040000000bd77b 5e56b3f000048866b15ac840f0bc531565bfc2a1b5c6eb77c9 661f527ba8edd7344f93776e7cf6ae118bcdb8db8a6ea143d7 ae1d03c8672ac2c84bd677cd3fde3c37cf6e6a0"

However, my app pool is running under "local system" identity. So this
string might correspond to some default encrypted string.

Does anyone know how to get it working from my code?

Thanks,
Mandar
Sep 9 '08 #1
6 2836
I don't know what the error is - however, running a web-site as "local
system" seems very, very dangerous... is there any good reason it
needs that level of power? "least priveleged", 'n all...

Marc
Sep 9 '08 #2
On Sep 9, 8:33*am, Mandar <mandarpkulka...@gmail.comwrote:
Hi,

I have written some code in C# to programmatically create a website
and an application pool. Both seems to be getting created alright with
whatever settings I have applied. However, when I fire a request to
the website, I get a "page can not be displayed" message". I get
nothing in the event viewer logs. I read somewhere that from website
properties Home Directory Application Settings, if I remove and
recreate the application pool, website starts serving requests. This
DOES work but I am unable to figure out how to accomplish this from my
code. When I checked Metabase.XML file of IIS before and after doing
this change manually, only change I noticed that following gets added
inside <IIsWebVirtualDir>.

UNCPassword="49634462500000000600000040000000bd77b 5e56b3f000048866b15ac840f*0bc531565bfc2a1b5c6eb77c 9661f527ba8edd7344f93776e7cf6ae118bcdb8db8a6ea143d 7*ae1d03c8672ac2c84bd677cd3fde3c37cf6e6a0"

However, my app pool is running under "local system" identity. So this
string might correspond to some default encrypted string.

Does anyone know how to get it working from my code?

Thanks,
Mandar
Most likely the "page can not be displayed" has error number... 500
being "Server Error" may contain additional information - the strings
IE displays under "Technical Information" on 500 errors. You could try
to reproduce the error inside IE.

Or it could be a 403

or even "page not found"
Sep 9 '08 #3
Mandar wrote:
Hi,

I have written some code in C# to programmatically create a website
this has nothing to do with classic COM-based ASP
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 9 '08 #4
>>this has nothing to do with classic COM-based ASP
@Bob - Am I not supposed to ask this query on this group? I am a bit
confused. My query is more related to IIS than it has do with C#. So
chose to write on this group.
>>You could try to reproduce the error inside IE.
@G.S. - In IE I get the following -

<snip>
More information

This problem can be caused by a variety of issues, including:

Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's
domain.
If this is an HTTPS (secure) address, click tools, click Internet
Options, click Advanced, and check to be sure the SSL and TLS
protocols are enabled under the security section.
</snip>

But I dont think any of this holds true for me.
>>running a web-site as "local system" seems very, very dangerous...
@Marc - I am writing an installer where I need to create a web site
and provide user with possible identity options as - Local System and
User Configurable. Thats not my issue here.

The fact that I can make the website working by just recreating the
application under the website leads me to believe that I have done
something wrong in my code or something is missing that should be
there. Any pointers?

Thanks,
Mandar
Sep 10 '08 #5
Mandar wrote:
>>>this has nothing to do with classic COM-based ASP
@Bob - Am I not supposed to ask this query on this group?
It's not a question of "supposed" - it's a question of posting your
question in a place where you will most likely find the people to help
you. I'm not trying to be a net cop - I'm just trying to make sure you
find your answer as quickly as possible.
I am a bit
confused. My query is more related to IIS than it has do with C#. So
chose to write on this group.
This group deals with COM-based ASP questions, not IIS or C# questions.
Sometimes an IIS question will get an answer here, but you can be better
assured of reaching the proper audience at .inetserver.iis if the .Net
people can't answer it.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 10 '08 #6
@Bob - thanks for the clarifications. I am a bit new to these group
ethics stuff. Am really stuck at this point and want an answer asap.
So decided to write on a few related group. Sad that this group is not
a right place. Thanks again. I will try posting this on inetserver.iis.
Sep 10 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pattnayak | last post by:
Hi, I want to create a DTS package programatically (preferably in C#.net),which will copy all my tables from a oracle database to my sql-server database. Can anybody help me doing this??? Thanks...
6
by: Null Reference | last post by:
Anybody here who can explain or point me to a link ? I wish to create a blank MS Access DB file programmatically using C# . Thanks, nfs
0
by: MarkusPoehler | last post by:
I have several classic ASP projects running on Webserver. I would like to implement some .net functionalities. Because I need the references I have to "upgrade" the existing ones wit a new .net...
7
by: coleenholley | last post by:
Hi all :-) I have a couple of web pages created using ASP.Net and VB code-behind. We use a connection call through an RPC to COBOL, NOT an SQL connection, so my connection to get the data is done...
5
by: Peter Schoots | last post by:
I am an amateur programmer and trying to move from VB6 to VB.net. I can't figure out how to create a ADO.NET database in code. I know how to create a dataset and wonder whether there is a way to...
5
by: Brian McClellan | last post by:
Just wondering if anyone has a simple example of creating a gridview completely programmatically, i'm not doing anything terribly sophisticated. When creating the gridview declaratively evertying...
4
by: VB Programmer | last post by:
My client wants to be able to have unlimited pages in his website and I'm making an "admin interface" for him to add and remove pages. (He will use Macromedia Contribute to modify the content of...
2
by: =?Utf-8?B?QWxhc3RhaXIgQmVsbA==?= | last post by:
I am having trouble creating a web site on a server running sharepoint services. I am creating an ASP.Net website using Visual Studio 2005. The server I am trying to create it on is a Windows 2003...
4
by: Mandar | last post by:
Hi, I have written some code in C# to programmatically create a website and an application pool. Both seems to be getting created alright with whatever settings I have applied. However, when I...
2
by: MalikTahirMahmood | last post by:
Hi, i am developing a car rental application, in which i required to get data from "salik Web site" UAE Toll system, I created one Desktop application in which i placed on webbrowser control and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.