简体   繁体   中英

create application on different web site in IIS on different machine

We are building a asp.net system which is used to publish .net based web service.

It has a simple logic: we have many kinds of web service templates under the App_Data folder.

For example,our application url is : http://localhost/serviceManager

And this is the folder of our application:

App_Data
   ws1.zip
   ws2.zip
Bin
modules
service
web.config

Note: When this system if first visited ,we will check if the "service" directory is "application" in iis. If not we will make it.

Through our system user can fill some required information (especially the service name,for example "test") step by step and we gather them for later use.

Then we create a folder named test under the service directory,then we find the accordingly web service template(for example ws1.zip),extract is content to the test folder, then we modify the web.config file accordingly information we got.

At last we set the test as a application in IIS.

Now the folders of our application will change like this:

App_Data
   ws1.zip
   ws2.zip
Bin
modules
service
  test
    App_Data
    service.asmx
    web.config(filled with gathered information)
web.config

And a new web service is deployed,we can access it use this:

http://localhost/serviceManager/service/test/service.asmx (note,the service.asmx exist in every template)

This is what we can do so far.

However the client have further requirements now:

1. separate the manager system from the created service.

Since the client want to map the created service to internet and keep our manager system only on intranet,this is for security.

As you can see,the created service is put under our manager application. We need to deploy them in a different port(in iis,different port means different web site,isn't it?).

For example,our application url does not change: http://localhost/serviceManager

But the created service will change to something like this: http://localhost:8888/service/test/service.asmx

2. implement the cluster(especially for the created service)

Since the created services are mass-oriented,so for performance considernation,the client require cluster.

However we do not found anything like weblogic for IIS cluster.So we think the only way it make the copy of the service once it is created and put it in another server (the cluster node) with the same port and virtual context name.

If so we need to create "application" in iis in different machine as my post topic.

We have no idea now,anyone can give us some suggestion?

BTW,we have to support iis6 - iis7.5.

I am the asker of this question.

We have not find a prefect solution by now. But we have done some jobs.

Our asp.net application have been packaged as a window installer. When the application is installed, some necessary jobs would be done:

1 Create two web sites at different port like 8000(for service manager) and 8001(for created services.

2 Make the root directory of web site of 8001 as windows shared folder.

3 Deploy an iis application named IISManager . This application is a web service which will make a folder under a web site root directory as an IIS application.

Now when user access the:

http://ip:8000/servicemanager , and create a service according to the template.

We will do the following things:

1 copy the extracted and configured folder to different cluster nodes by the window shared folders.

2 call the IISManager service one by one to make the folders at step1 as an IIS application.

Now if the step successful, we can access the new created service:

http://ip:8001/servicename/service.asmx

That's what we have done now.

But we still have a lot of problems:

1 The IISManager does not work every time, the iis application creation would be failure sometime.

2 The created service at different nodes are completely separate applications, it will be hard to do some session share job.

I hope someone have a better solution,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM