Setting up SSL with IIS for development and testing of ASP.NET applications

Note: this will potentially solve the issue when Visual Studio shows the following error upon trying to debug: “Unable to debug the web server… An error occurred on a send.”

The problem can be solved by re-creating and adding a SSL cert to the port 443 binding of the default web application.

 

Follow the following steps:

From IIS, under the local server, open “Server Certificates”. Use an existing cert or create a self-signed cert, give it a name.

Select the Web application(not a virtual directory) that you want to use. Edit the bindings, add a binding for https port 443 and select the certificate you created previously and then save.

Note: when running applications off an existing web application in IIS, make sure to create virtual directories for each app if they are not available, you can do so by going to the project’s properties, under “Using local IIS server”, next to the URL of the app click the button “Create virtual directory”

Saving settings to app.config for C# winforms app

Follow the following stackoverflow question:

http://stackoverflow.com/questions/30572923/read-all-key-values-from-app-config-c-sharp

Configuration config = ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath);

config.AppSettings.Settings.Remove("MySetting");
config.AppSettings.Settings.Add("MySetting", "some value");

config.Save(ConfigurationSaveMode.Modified);

To study of new code base

Use some of the suggestions below:

The power of communication is often underestimated, try to talk to the author(s) of the code first.

Then, read through design documents provided by the authors. However stop if the documents seem to make things more confusing than help you understand.

Make use of note and diagramming tools, such as the SQL Server diagram tool, to make understanding the code more intuitive.

Learning the framework or development style used (MVC, N-tier, REST api) can be very useful to understand how code work if it follows certain programming style.

Do a debug and step through the code, see how things connect with each other. Don’t abuse this method ’cause it can be time consuming.

Hack around to get the job done.

Changing masterpage for a application page in SharePoint 2013

Follow the answer: http://sharepoint.stackexchange.com/questions/156521/error-the-referenced-file-catalogs-mycustompage-master-is-not-allowed-on-th

It seems the masterpage needs to be included in the project.

The masterpages under /_catalogs/masterpage are publishing masterpages, they are stored in the Content DB. It seems for application pages the server only searches for masterpages under the _layouts folder.