How to copy IIS configuration to another machine - visual-studio

How can you copy an IIS configuration to another machine so that settings are not lost and do not have to be set up from scratch on the new machine?

According to your description, I suggest you could try to use shared configuration to achieve your requirement.
You could refer to below steps:
1.Open IIS management console and select your server
2.Find the Shared Configuration
3.Click “Export Configuration” and type in the password
4.Copy the files to the new server
5.On the new server, go back to the “Shared Configuration” section and check “Enable shared configuration.” Enter the location in physical path to these files and apply them.
It should prompt for the encryption password(if you set it) and reset IIS.

Related

Secure windows service config file

I have a windows service with an accompanying config file. The service is going to be installed on a bunch of lab computers and monitor things such as diskspace, network connectivity, logins, etc.
After a set interval, it will report the statistics to a Database. In order to connect to the DB, I currently have the application user's name and password stored in the connection string, which can be found in the config file.
What's the best way to secure this, such that regular users cannot access it? We do a similar thing here with our webapps using the Web.config, and we have IIS setup such that people can't browse into the directory and read it.
Is there a best practice to securing a config file stored locally on each machine for a windows service?
Use the same method that you would use for web.config
1- Go to the windows service folder, where configuration file is located
2- Rename the config file to web.config (back it up first)
3- Execute:
c:\Windows\Microsoft.NET\Framework64\[the asp versino]\aspnet_regiis.exe -pef "[name of the config file to encrypt]" .
4- Rename the web.config back to the original name
More info here
https://msdn.microsoft.com/en-us/library/zhhddkxy.aspx

Could not load the Tomcat server configuration

I edited catalina.properties trying to change the port of the server, it didn't work and restored the original values and now I am getting the following error:
Could not load the Tomcat server configuration at /Servers/VMware
vFabric tc Server Developer Edition v2.9-config. The configuration may
be corrupt or incomplete. Resource is out of sync with the file
system: '/Servers/VMware vFabric tc Server Developer Edition
v2.9-config/catalina.properties'.
This is the default server provided by Spring Tool Suite.
The solutions I found did not help me, like copying all the TOMCAT_DIR/conf files to my server location, which is in workspace/Servers.
Any help?
I am not sure, that my problem is the same, I had similar issue about ports conflict.
My solution was based on changing ports in catalina.properties. I deleted default Pivotal tc Server, than found in installation catalina.properties on the path
sts-bundle/pivotal-tc-server-developer-3.0.0.RELEASE/tcServer/conf.
The last 4 lines in file are:
base.shutdown.port=-1
base.jmx.port=6969
bio.http.port=8080
bio.https.port=8443
Change ports as you like (to have unused ports).
Create a new server. select Pivotal -> Pivotal tc Server... next.
On the next page push radio button Existing Instance and select tcServer. Finish.
Than try to start server to check, if ports are unused yet. If yes, the server should start.
To change a Tomcat port, you need to edit server.xml, not catalina.properties See: link.
Try reinstall/unzip again, and start from scratch. I often mess up servers, and can never work out what happened. It is much faster in the long run to reinstall.
Also, before you do that, try F5 in your IDE, because 'out of sync with file system' usually means you need to press F5 (refresh).

How to configure active directory running on Virtual machine

I have active directory installed on a Virtual Machine having OS Win Server 2012.
Now I want to configure it so that users can access it.
My IP Add is: 103.31.80.54
Subnet Mask: 255.255.255.252
GW: 103.31.80.53
What to do??
Follow the below mentioned steps from the Server Manager on Windows 2012 Server:
Open the Notifications Pane by selecting the Notifications icon from the top of the Server Manager. From the notification regarding configuring AD DS click
Promote this server to a domain controller.
From the Deployment Configuration tab select Add a new forest from the radial options menu. Insert your root domain name into the Root domain name field. [i.e
yourdomain.com]
Review and select a Domain and Forest functional level. Once selected fill in a DSRM password in the provided password fields. The DSRM password is used when
booting the Domain Controller into recovery mode.
Review the warning on the DNS Options tab and select Next.
Confirm or enter a NetBIOS name and click Next.
Configure the location of the SYSVOL, Log files, and Database folders and click Next.
Review the configuration options and click Next.
The system will check to ensure all necessary prerequistes are installed on the system prior to moving forward. If the system passes these checks you will
proceed by clicking Install. [The server will automatically be rebooted once the installation completes]
Once the server is done rebooting reconnect via RDP. Congratulations on successfully installing and configuring a Active Directory Domain Services on Windows
Server 2012.

Sql Server Express failed to generate user instance

I am using Visual Studio 2010/c# and created an application where I am trying to access as a data source,a database which I created in SQLSERVER Express (via management studio).
I have several instances from previous installs which I remove -
SQL COnfiguration manager just shows 1 instance SQLEXPRESS which got installed as a named instance "mymachine/sqlexpress".
Named pipes, TCP/IP and remote clients are all enabled.
I am running under windows 7 64 bit and both the dev environment and sql are in the same PC.
When I try and configure the connection I go to the physical path where the file resides, add it but the test connection button fails with the msg failed to generate a user instance of sql server, only an integrated connection can generate an user instance
The solutions I found don't seem to apply.
User Instance is already enabled (set to 1) and I could not find any path to remove "old instances" there is only 1 path leading to the currently installed Instance.
Help would be appreciated
Using Visual Studio SQL Server database through IIS7,
they use default asp.net database.
Following might help,
Open IIS manager.
create a new application pool instead of using default application pool and keep your database in that.
Go to sql configuration manager > go to properties.
Select local system instead of built in system.
In the default browser option, Delete all the other files and paste your .asmx file.
See in actions. If anything is disabled, enable it.
Hope it helps. :)

Hosting WebMatrix Page

What exactly do I need from a host for my webmatrix project to work? I know Scott Hanselman from Microsoft gave out a few nice host sites but I was just wondering for fun.
In order to publish to a host from WebMatrix using Web Deploy, the host needs to be in a compliant state. First of all, it has to run WebDeploy and the remote service WMSvc has to be in a desired state (enabled and started). Delegation rules have to be set up, so that the user has permissions and the right scope to deploy various components like IIS application, database, ACLs, etc. In order to check whether a host is WebMatrix-friendly, ServerValidator tool can be used (see the article for a full list of host requirements).
If you want to publish to a host though FTP, all you need to ensure is that FTP publishing is enabled on the host.
Hope this helps.
You can use any .Net 4.0 host, but you'll need to copy a bunch of DLL files to yuor bin folder.
The exact files required depend on what libraries your site uses.
At a minimum, you'll probably need
Microsoft.Web.Infrastructure.dll
Microsoft.Web.Helpers.dll
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.Razor.dll
WebMatrix.Data.dll
WebMatrix.WebData.dll
These can be found in Program Files\Microsoft ASP.Net.
If it still doesn't work, copy any additional files from FileNotFound errors.
To publish your website from WebMatrix - your hosting provider must support one of the two publishing technologies - FTP and/or WebDeploy.
In case of FTP, you would need to manually enter the following ftp settings: FTP Server, username, password and destination url. Optionally you can also specify the site path
In case of WebDeploy, you could just get the publishsettings file for your host and import the settings. Else, you can also manually enter these settings.

Resources