Monday, April 20, 2015

Webservice authentication does not work on IIS7, IIS8 & IIS8.5

You get 401 Authhorization failed (401.2 to be exact seen in IIS logs)
If you have enabled windows authentication in IIS, you should be able to hit the URL via browser, with no issues. This is assuming the account is allowed via authentication controls.

Problem is that in IIS7, IIS8 & IIS8.5, Basic authentication is not installed by default. if you do not have this option in authentication, you have to install basic authentication by via Server Manager,  Add Roles and Features, IIS, Security, Basic authentication.

Once done you should be able to enable Basic authentication and make WebService calls work.

Monday, March 30, 2015

how to find description of "sc-substatus" code from IIS logs

Open command line and issue command net helpmsg where is the number you got from iis logs.
Example:

c:\net helpmsg 1326

The user name or password is incorrect.




Tuesday, December 16, 2014

How to check SSL version used to connect to a website


To see what version of SSL you are using, in Internet Explorer (IE)
Visit the website you want to check in IE
Once the page is loaded, go to File (You may have to press Alt key for menu options to show up) and then select Properties
































Now, review the connection value in this popup. This shows the type of connection made as well as the SSL versions. In this example, this popup shows TLS 1.2




























In chrome, click the green icon next to the URL once the page loads. Now, click the tab connection and shows the SSL versions. In the below example, it shows TLS 1.2








Monday, December 1, 2014

Saints Row IV - the steam servers are too busy to handle your request (error code 53)

Was getting error the steam servers are too busy to handle your request (error code 53) trying to start  Saints Row 4.

Turned our McAfee was creating an issue. All I had to do to solve as turn off real time scanning for a moment while the first time the game was run. Once the game started up for first time, I was able to enable McAfee real time scanning back on. Happily, didn't see this issue anymore. Guess the real time protection was blocking installing the software.

Friday, November 21, 2014

Validation of viewstate MAC failed when posting from one aspx file to another (cross posting asp.net forms)

The error
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.


We have a aspx form that posts to another form. This was done by changing form action for the first form to point to the second form. When this happens, asp.net was giving the above error.

As a solution, the submit button on the form was also changed to update the postbackURL to point to the second aspx page. So essentially, the form action and also the submit button postback URL were both pointed to the second aspz page where the form data is submitted!

Example:
this.Form.Action = "MyPage2.aspx";
SubmitButtonCtl.PostBackUrl = "MyPage2.aspx";

Friday, November 7, 2014

How to Mirror or Sync entire directory and subdirectories with all files included using robocopy in windows

Windows comes with a nice command line tool called robocopy. Use the below command to sync up two folders.

robocopy dirA DirB\ /MIR /W:5

where DirA is the source folder and DirB is the destination folder. If DirB do not exist, it will create one for you. If it already exist, it will check every item in Destination folder DirB and its sub-folders and make sure it mirrors the source directory DirA and its sub-folders. It deletes extra files or copies over new or updated files to complete this task.


Internet Information Services 8.5, Windows server 2012 R2, asp.net 4.5.1 error "The resource cannot be found."


After configuring my application in IIS, I was continuously getting this error "The resource cannot be found." while requesting any aspx files. Images and html files were opening just fine


Server Error in '/' Application.
The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /myapp/Index.aspx


It turned out that I have created the website and pointed the folder as f:
ie; the in the site, the physical path was pointing to f:
It started working after I changed f: to f:\

I didn't care about this as nobody was supposed to access the site directly; they all will go to a sub application folder. I had then proceeded to create my application myapp under this site and copy all the application files over. Unfortunately, the application refused to execute any aspx code with this odd error "The resource cannot be found." in any subfolders (sub applications under main site) until I fixed the path of the main site as f:\


Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...