Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Search Engine

Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.



Filter by Category

























































This search, performed through 3.59 MB (635 documents, 14094 words), completed in 0.1 seconds and yielded 30 results.

Membership API in ASP.NET — 11.8%

[...] type="text/javascript"> document.getElementById("ctl00_PageBody_uxPasswordRecovery_UserNameContainerID_UserName").focus(); </script> Top PasswordRecovery.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class passwordRecovery : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { HtmlForm mainForm = (HtmlForm)Master.FindControl("form1"); if (mainForm != null) { [...]

Custom Configuration Sections Example - .NET Framework — 6.9%

Overview This article explains how to implement a custom configuration section in your app.config or web.config file. Process 1. Set a reference to System.Configuration 2. Create your custom configuration class, inheriting from System.Configuration.ConfigurationSection . 3. "Register" the custom section in your config file 4. Create the custom section in your config file. Sample Code Usage static void Main(string[] args) { var settings = CustomConfig.Settings; [...]

Conditional Compilation - Visual Studio — 4.2%

[...] a work-around involving conditional compilation in Visual Studio. Solution (1) Create a new Build Configuration via Build menu > Configuration Manager > Active Solution Configuration = {New...} > (call it the name of your company). (2) In the code where the web service is called, conditionally "remove" the web service calls, like the following example. #If CONFIG <> "AcmeCompany" Then result = webServiceClass.WebMethod(); #End If (3) Make the new build

Installing a .NET Windows Service Multiple Times — 3.5%

[...] solution was to install multiple instances of the service, each in its own folder and with its own configuration file. The key to getting this to work was to know how to install a .NET Windows service via installutil.exe and change the name of the service during installation. You do this by coding the service project installer to handle a custom command line argument. This article documents how to do this. This article was adapted from http://www.damirscorner.com/InstallNETWindowsServiceWithADifferentName.aspx Procedure 1. Create a Project Installer for the service. [...]

Creating a WCF Self-Hosted Service — 3.5%

[...] Service " suffix. 6. Add an app.config file to the project, mimicking the following settings. <configuration> <system.serviceModel> <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true--> <behaviors> <serviceBehaviors> <behavior name="behavior0"> <serviceMetadata httpGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="False" /> </behavior> </serviceBehaviors> </behaviors> <services> [...]

Report Server URLs - SQL Server Reporting Services — 3.5%

[...] /ReportServer/ReportService.asmx Actual URLs You can determine the actual URLs via the SQL Server Reporting Services Configuration Manager application. 1. On the database server hosting SSRS, navigate to Start Menu > Programs > Microsoft SQL Server > Configuration Tools > Reporting Services Configuration Manager 2. In the Reporting Services Configuration Manager [...]

Changing Cookie Names - ASP.NET Security — 2.8%

[...] Procedure Forms Authentication (Legacy) Change or add the following setting in your web.config file: //configuration/system.web/authentication/forms/@name <configuration> <system.web> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" defaultUrl="~" name=" tokenA " /> . . . Forms Authentication Change or add the following setting in your web.config file: [...]

Configuration Settings in ASP.NET Core — 2.8%

Overview This article provides and extension method to be used with dependency injection to map a configuration file section to a class. Code public static class ConfigurationExtensions { public static TConfig MapConfigSection<TConfig>(this IServiceCollection services, IConfiguration config, string name) where TConfig: class { var settings = config.GetSection(name).Get<TConfig>(); services.AddSingleton(settings); return settings; } } Usage Startup.cs Include the following code your Startup.cs file. [...]

Using Custom Sections in an App.Config File - .Net Framework — 2.8%

The following excerpt from an app.config file demonstrates how to add a custom section to a configuration file. A custom section may have whatever schema is desired by the developer. <configuration> <configSections> <section name="myCustomSection" type="System.Configuration.IgnoreSectionHandler" /> </configSections> [...]

Consuming Custom Controls in ASP.NET — 2.8%

[...] except for capitalization these attributes are the same as for the <%@ Register %> tag above. <configuration> <system.web> <pages> <controls> <add tagPrefix="abc" tagName="PageSelector" src="~/UserControls/PageSelector.ascx"/> ... </controls> </pages> </system.web> </configuration> Class-Based (VB or CS file) In your web.config file, you would include an entry similar to the following. The tagPrefix attribute specifies what you use in the ASPX markup; the [...]

COM+ Server Setup — 2.8%

[...] some links provided at the bottom of this document for an in-depth explanation of how to perform the configuration. Setup Procedure Operating System and COM+ Setup The following procedure will setup the server to perform all COM+ processing. 1. Install Windows 2000, Service Pack 2 (or higher) on the server. 2. Run Windows Update (http://www.windowsupdate.com). 3. Install MDAC 2.6 4. If the calling program is on a different Windows NT domain than the server, then for each user profile under which the client app will run, create a local user account with the same username [...]

Difference Between Class Library Project and SQL CLR Project — 2.1%

[...] DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' [...]

Transforming External Configuration Files - Visual Studio 2010 — 2.1%

[...] configSource="App_Config\ConnectionStrings.config" /> Solution 1. Create ConnectionStrings. BuildConfigName .config for each build configuration 2. Add a post-build event using the following [...]

FileUploadExtender Class - ASP.NET — 2.1%

[...] validExtensions Is Nothing Then _reason = "No valid extensions for file uploads were found in the configuration file." ElseIf _requiredField And Not Me.HasFile Then _reason = "File name is required." ElseIf Me.HasFile Then Dim exts() As String = validExtensions.Split(New Char() {"|"c}, _ StringSplitOptions.RemoveEmptyEntries) Dim myExt As String = Path.GetExtension(Me.FileName).ToUpper() If myExt.Length > 0 Then myExt = myExt.Substring(1) [...]

Enabling Remote Connections - SQL Server 2005 Express — 2.1%

[...] Express Edition, perform the following procedure. Start Menu > Programs > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration [...]

Transforming AppSettings.json to Azure Configuration Settings — 2.1%

[...] provides code to transform the JSON found in an "appsettings.json" file to the JSON using by Azure Configuration settings. Code declare @input varchar(1000) [...]

Code First Entity Framework - .NET Framework — 2.1%

[...] SiteDbInitializer()); Alternatively, you could set this up in the web.config file, like this. <configuration> . . . <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <contexts> <context type="CompanyName.ProjectName.Data.MyDomain, CompanyName.ProjectName.Data"> <databaseInitializer type="System.Data.Entity.MigrateDatabaseToLatestVersion`2[[CompanyName.ProjectName.Data.MyDomain, CompanyName.ProjectName.Data], [CompanyName.ProjectName.Data.Migrations.

reCaptcha Implementation in MVC3 - ASP.NET MVC — 2.1%

[...] => m.Recaptcha) Reusable Code Web.Config In your web.config , add the following settings to your /configuration/appSettings section. <!-- reCaptcha--> <add key="Recaptcha.PublicKey" value=" your-public-key " /> <add key="Recaptcha.PrivateKey" value=" your-private-key " /> <add key="Recaptcha.ValidationUrl" value="http://www.google.com/recaptcha/api/verify" /> Shared View To your /Views/Shared/ folder, create a new view called Recaptcha.cshtml and add the following code to it. @using System.Configuration @{ [...]

Downloading Reports from an SSRS Server — 1.4%

[...] ssrs.DownloadReports(rootFolder); } } SsrsEngine.cs /* Packages Required (1) Microsoft.Extensions.Configuration.Json (2) System.Data.SqlClient */ using Microsoft.Extensions.Configuration; using [...]

Configuration Settings - .NET Framework — 1.4%

Overview This article provides code which will retrieve configured settings regardless of whether the calling code is running within a Web API (which retrieve the settings from the web.config file's appSettings section) or an Azure Function app (which retrieves it from the settings configured on the [...]

Forcing SSL with a URL Rewrite Rule - IIS7 — 1.4%

[...] The web.config file should contain the following. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="https://yoursite.com" httpResponseStatus="Permanent" /> </system.webServer> </configuration> [...]

Home Page — 1.4%

[...] Serialization and Deserialization - C# Redirecting Process Output ·Net Framework AddBusinessDays Function - C# Adding A Description To A .Net Windows Service AuditableBase Class for Automatically Tracking Data Changes - Entity Framework Code First Azure Blob Service - C# Azure Functions Version Building an Address by Concatenating Field Values Calculating Age from Date of Birth Calculating Midnight in a Time Zone - SQL Server Changing XSL Code on the Fly - .NET Framework Class Library Pages ClickOnce App.Config Location - .Net Framework ClickOnce Bad Hash [...]

Implementing a Report Viewer Page - ASP.NET MVC — 1.4%

[...] Configure ServerReport ---*/ /* The SomeCustomConfigurationObject retrieves configuration info from the web.config file */ var config = new SomeCustomConfigurationObject(); if (!config.DefaultCredentials) rpt.ReportServerCredentials = new ReportServerCredentials(config); rpt.ReportServerUrl = config.ReportServerUrl; rpt.ReportPath = config.RootPathWithSlashes + reportName; /*--- Set LoginName Parameter (?) ---*/ p = rpt.GetParameters()["LoginName"]; [...]

Security Overview - Sitecore — 1.4%

[...] Sitecore.Context.Domain.GetFullName(uxUserNameTextBox.Text) General User Access Setup Procedure Web.Config Within the /configuration/sitecore/sites/site for your site, set the loginPage attribute to the page to be redirected to, and set the requireLogin attribute to true only if EVERY page on the site (excluding the login page) will require the user to login. Set it to false otherwise. (It is more common to be set to false .) Within /configuration/sitecore/settings/setting [...]

Updating SSL Certificate on SSRS Server — 1.4%

[...] . Configure SSRS to Use the New Certificate (1) On the Windows Start menu, run the "Report Server Configuration Manager" app (2) Select "Web Service URL" (3) For HTTPS Certificate field, choose the one with today's date (This will be the certificate you edited the Friendly Name for above.) (4) Click the Apply button and wait for it to process. (5) Select "Web Portal URL" (6) Click the "Advanced" button (7) In the bottom half of the dialog (for HTTPS Identities), click the "Edit" button. (8) For Certificate field, choose the one with today's date (This will be the [...]

GridView Class - ASP.NET — 1.4%

[...] deleting of a row. Source Code C# {copytext|SourceCs} using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data; public delegate DataTable EmptyDelegate(); public delegate void DataKeyDelegate(DataKey rowKey); public delegate void GridViewRowDelegate(DataKey rowKey, GridViewRow gvRow); namespace JasinskiSoftware { public class GridView : System.Web.UI.WebControls.GridView [...]

Chapter 03: Handling Events and Managing State - MCTS Exam 70-515 — 1.4%

[...] Application state Choosing Session State Mode Session State Mode is set in the web.config file in the /configuration/system.web/sessionState node and can be read via the System.Web.SessionState.HttpSessionState.Mode property in code. Modes other than InProc and Off require additional configuration [...]

ConfigMgr Class — 1.4%

[...] ConfigKey { /* Elements of this enum should match the entries in your web.config file's /configuration/appSettings section */ } public static class Config { public static string Get(ConfigKey key) { string s = ConfigurationManager.AppSettings[key.ToString()]; if (s == null) throw new Exception("Configuration [...]

Membership API with Windows Authentication and a Custom Role Provider - ASP.NET — 1.4%

[...] is called when ASP.NET checks if a user has authorization to view a page. Procedure Web.Config <configuration> <system.web> . . . <authentication mode="Windows"/> <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="MyRoleProvider"> <providers> <add name="MyRoleProvider" type="MyNamespace.RoleProvider" /> </providers> </roleManager> <authorization> <allow users="*" /> <deny users="?" /> [...]

Performance Optimization in MSMQ — 1.4%

[...] the app uses MSDTC or MS SQL Server, configure their log files to use separate disks. If a five-disk configuration is impractical, note that a three-disk configuration [...]

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.