Tuesday, October 22, 2024
Run a Laravel application on Windows using Docker
Thursday, July 24, 2014
SQL Server: insufficient memory to continue the execution of the program (mscorlib)
When using large size SQL generated scripts to create/recreate databases, the above message is encountered.
To solve the issue, go to command prompt and issue the below command
c:\Program Files\Microsoft SQL Server\100\Tools\Binn> sqlcmd -S (LocalDb)\v11.0 -i D:\SQLDB\SqlserverScript.sql
Setting changes that you will need to do based on your environment
"c:\Program Files\Microsoft SQL Server\100\Tools\Binn" go to the folder where SQL server installed in your workstation
(LocalDb)\v11.0 - Replace this with your SQL server instance name
"D:\SQLDB\SqlserverScript.sql" - path to SQL script
Wednesday, October 2, 2013
IIS 7 - Setting up host headers using command line or batch file
As part of windows server administration, administrators may face a common problem in transferring the host headers when migrating web applications from one server to another.
A simple solution is to prepare a list of host headers and execute the addition of these host headers via a command line
Step 1: Go to C:\Windows\System32\Inetsrv
Step 2:
a) Execute the command to a "Site Host header" appcmd set site /site.name:"Website name on IIS Server" /+bindings.[protocol='http',bindingInformation='*:80:Site Host Header']
b) For specific IP binding appcmd set site /site.name:"Website name on IIS Server" /+bindings.[protocol='https',bindingInformation='10.0.0.10:80:sampledomain.com']
c) For HTTPS binding appcmd set site /site.name:"Website name on IIS Server" /+bindings.[protocol='https',bindingInformation='*:443:Site Host Header']
Friday, August 31, 2012
How to remove or modify "Server" http header in IIS 7 / IIS 7.5?
Server: Microsoft-IIS/7.0
Few methods are used to prevent IIS from sending the identification of the server to a client. This prevents the client from identifying the server hence delaying easy break through into the server.
One such method is writing a custom module (code given below) and saving the Class file under App_Code folder
Code from Stefan Gossner
using System;
using System.Text;
using System.Web;
namespace StefanG.ServerModules
{
public class CustomServerHeaderModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreSendRequestHeaders += OnPreSendRequestHeaders;
}
public void Dispose()
{ }
void OnPreSendRequestHeaders(object sender, EventArgs e)
{
// modify the "Server" Http Header
HttpContext.Current.Response.Headers.Set("Server", "My Test Server");
}
}
}
Then, go to IIS 7 server and double click on "Modules". Then click "Add Managed Module". A dialog will open asking you to enter Name and Type. Enter a strong name for the module and choose the module (the one that we saved under App_Code) from the drop down and click OK. Restart the server.
Thats it! When you browse the website, Server identification will now be removed or modified based on the code in your module.
For IIS 6 UrlScan needs to be setup.
Thursday, August 30, 2012
How to remove ASP.Net version header from IIS 7 , IIS 7.5?
Add the following line to web.config within System.web node
<system.web>
<httpRuntime enableVersionHeader="false" />
</system.web>
Friday, March 23, 2012
How to check IP PING results automatically in Windows?
FOR /L %i IN (1,1,20) DO ping -n 1 192.168.1.%i | FIND /i "Reply">> d:\ipreplies.txt
Run the .bat file and it will save the results to "d:\ipreplies.txt"
In the above FOR loop we check for the usage of IP's starting from 192.168.1.1 incremented by 1 to 192.168.1.20.
Thursday, March 8, 2012
How to open a set of ports in windows firewall?
If you want to add multiple ports there is no option for you to open multiple ports (port range) with a simple addition of a filter.
To do this we need to type the following in the command prompt (Run > cmd):
FOR /L %I IN (9000,1,9100) DO netsh firewall add portopening TCP %I "Site Ports" %I
The ports will be incremented by 1 from 9000 until 9100.
In windows 2008 it is much easier than this. You can easily add a port range in the Firewall filter rules
Tuesday, October 27, 2009
System.InvalidOperationException: Unable to generate a temporary class (result=1).
Run the command aspnet_regiis -i
Error: Redirect from .net to classic asp page - This type of page is not served.
aspnet_regiis -ga "NT Authority\Network Service"
Thursday, October 22, 2009
allowDefinition='MachineToApplication'
Check where the web.config is created. It might have been placed in one of the sub folders instead of the root folder.
Placing the right web.config in the right location should solve this problem.
Thursday, October 15, 2009
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Solutions:
One of the possible causes for the error is the driver that is used in the connection string.
Some uses SQL Native Client and some uses SQL Server as their drivers.
Another possible cause may be the DSN is not set up correctly. Ensure that you test your DSN setting.
Why is my IIS log file have different time in it while my system time is set correctly?
For W3C Extended log file, the date and time is set to be in GMT by design and this should explain the time difference in the log files.
For further information visit microsoft site
Wednesday, October 14, 2009
How to check shared folders and files in a windows network environment?
File > New (Console root dialog appears)
File > Add/Remove snap-in > Add > then choose the snap-in "shared folder" from the list of snap-ins and click "Add" button
Next in the Shared Folders dialog, choose the computer in which you want to find who has shared folders and files and click the "Finish" button. Then click "Close" button followed by "Ok" button.
Expand Console Root > "Shared Folders" and you can check the list of shared folders (shares, sessions and open files)
Monday, October 12, 2009
SQL Server error 1069
An error 1069. (The service did not start due to a logon failure) occurred while performing this service operation on the MSSQLServer Services
Solutions:
When the above error happens in a windows XP machine go to Start -> Run -> services.msc. Then double click on MSSQLServer.
i) Under the Log on tab choose Local System Account. This will enable the system account serve the sql instance
ii) As a developer if the computer is assigned a user name and password, try entering the correct password for the account which should resolve the above error message
Tuesday, October 6, 2009
How to install Fonts without Administrative Rights in Windows?
i) Organize the fonts in a folder c:\MyFonts
ii) Select Control Panel -> Fonts
iii) From file explorer windows, click the menu File -> Install Fonts
iv) Go to the font location which in our case is "MyFonts". Uncheck "Copy Fonts to Fonts Folder" and select the desired fonts that needs to get installed and then click ok
Thursday, May 21, 2009
Classic ASP, Stored Procedures and NText
NText, NVarchar in SQL Server - Support for Unicode Content
Sunday, December 28, 2008
What is MMC? How to access Internet Service Manager?
You can access MMC by typing Start > Run > mmc.
You can call the Internet Service Manager MMC in many ways,
1) Start > Control panel > Administrative tools > Internet Services Manager
2) Start > Run > inetmgr (short cut to call IIS manager)
How to execute .asp or .aspx file from my computer?
Under "Network Identification" or under the tab "Computer Name" there will be separate marking called "Full Computer name" followed by the name of the computer machine/server. For e.g. if the name is something like "myserver", then you can access the server side scripts by typing the following URL on the browser address bar
http://myserver/myprogram.aspx
Alternative way is to type http://localhost/myprogram.aspx or by typing
http://127.0.0.1/myprogram.aspx.
127.0.0.1 is the loopback address that causes requests to be sent to a web server on the local machine and 'localhost' is an alias for 127.0.0.1