Posts

Getting 500 Internal Server Error after ASP.Net Core Hosting

Image
Getting 500 Internal server error when browsing ASP.NET Core Application in IIS web server. This error occurs because the target server system does not have .NET Core Runtime installed in it. This issue can be resolved by in installing " Hosting Bundle Installer ". which includes Windows Server Hosting and .Net Core Runtime version you are using. You can also install this two components separately. Both of this components are required to run ASP.NET Core Applications on server. You can download " Hosting Bundle Installer " from here . Check here for latest versions. If you need to download .NET runtime only, follow this link .

HOW TO ACCESS MS SQL IN WINDOWS SERVER FROM A REMOTE SQL SERVER MANAGEMENT STUDIO

Image
It is always troublesome to access MS SQL running in windows server from a local system. In this post I am explaining how to do it easily in less time. The main things to be done are: First we need to allow remote access to the sql server we are using.Then set a port to access the sql server through TCP/IP connection. Next step is to create an inbound rule in firewall to accept connection to that port. You can follow the steps given below to do this. 1. Connect with windows server 2. Open sql server management studio. And connect to the sql server instance. 3. Right click on the SQL server instance and select properties. 4. Select "Connections" from side menu. Make sure the "Allow remote connections to this server" Checkbox is selected. then press OK.  5.  Open "SQL server configuration manager" 6. In the side menu expand "SQL server network configuration" 7. Double click on the SQL instance name. 8. Ensure that "Shared memory&q

Add/Remove automatic password expiration of MS SQL user

Image
MS SQL has a automatic password expiration feature for database users. Which has both advantage and disadvantage.  Advantage is that it provides security. When we use the same password for same time, it makes it vulnerable to attacks. But when we implementing automatic password expiration feature we should change the database password in particular intervals. This will be difficult if the SQL server is less maintained or database user is accessed from multiple remote locations. So depending on our requirement we can turn ON or OFF this feature. The following step the following steps will help you to enable or disable automatic expiration of MS SQL user password. 1. open the SSMS and login using SQL server authentication 2. Expand the 'Security' folder in object explorer 3. Expand 'Logins' folder under 'Security' 4. All users will be listed in the 'Logins' folder. Now double click on the username we to change 5. On the popup window we can see &#

FIX: Severity Code Description Project File Line Suppression State Error Web deployment task failed.

Image
"Severity Code Description Project File Line Suppression State Error Web deployment task failed. An error occurred when the request was processed on the remote computer.) An error occurred when the request was processed on the remote computer. The server experienced an issue processing the request. Contact the server administrator for more information".             This error occurs when first time hosting to a IIS website using WebDeploy option in visual studio. When WebDeploy option is setup for a new website is created on IIS it will create a user for deploying. This error is causing because the created user does not have the sufficient permissions to access the website directories.              We can add this permissions manually by login in into server. The following steps are used to solve the error. login in to the windows server open IIS (Internet Information Service) Manager Select the website needed to deploy Right click on the website and select

FIX Web Deploy from visual studio failed with error ERROR_EXCEEDED_MAX_S...

Image
I had recently come across an error when hosting a web application. I was using web deploy method from visual studio 2017. When deploying to windows server 2012 i got error saying ERROR_EXCEEDED_MAX_SITE_CONNECTIONS. the complete erro message is as follows: " Severity Code Description Project File Line Suppression State Error Web deployment task failed. (The maximum number of connections for this site has been exceeded. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEEDED_MAX_SITE_CONNECTIONS.)"                   I get a solution after searching in internet for hours. So I thought if I make a post on it, it will be helpful for other and of course for me when same error come again. The following steps are used to solve the error. In window server open "Services" Find "Web management service" Right click in "Web management service"  Restart the "Web management service" Now try to deploy the web applic

Class files in App_Code folder cannot be accessed from other pages in Web application project

Image
                                                I have faced this problem multiple times and each time i found some solutions from Internet and go on with it. So I thought this time I will post it on the blog so next time I don't have to look somewhere else. Also it will be helpful for others.                We usually hear that class file in the project must put in App_Code folder. Actually this will work with Website projects in ASP.NET. In case of Web application project When we compile the Web application project, it won't include all file. This is the reason we can't access the class files in App_Code folder from other pages (because this file are not compiled). So to import a class file from App_Code folder in a WAP, we need to taken properties of class file in App_Code folder. Properties window will open as shown in image below.                  In properties window "Build Action" is set to "Content" as default. Change this option