ASP.Net – DataGrid – Adding Hyperlink Column

 

Background

There is a dated Black-book web site that I wrote to keep up with people and appointments years ago.

Here is what the Appointments page looks like:

List Appointments

BeforeGrid

Edit Appointment

BeforeEdit

 

Enhancement

Lately, I have found more and more the need to isolate the corresponding web link into its own entry field and not just mushroom it into the comments multi-edit box.

Edit Appointment

AfterEdit

List Appointments

AfterGrid

 

Code

I had a little problem and had to have my brother help me with .Net code to add an hyperlink to a Data Grid.

And, so wanted to place it online for anyone else rusty with ASP.Net

Code line


<asp:DataGrid id="gridContactEventInfo" BorderColor="black" BorderWidth="1" CellPadding="3" AutoGenerateColumns="false" runat="server" font-size="8" width='100%'>

 <HeaderStyle BackColor="#9FBCE3">
 </HeaderStyle>

 <ItemStyle BackColor="#EEF2F7">
 </ItemStyle>
			 
 <AlternatingItemStyle BackColor="#EEEEEE">                                 
 </AlternatingItemStyle>                                 
								  
 <columns>
 
	 <asp:BoundColumn HeaderText="Event" DataField="eventName" /> 


		<asp:TemplateColumn HeaderText="Link" >

			<ItemTemplate>		

			 <asp:HyperLink
					HeaderText="Link" 		
					Text="Link" 
					NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "eventLink") %>'
					Visible="True"
					Target="_blank"
					runat="server"
					> 	
			 </asp:HyperLink>   		    		                         																				
			
			</ItemTemplate>
			
		</asp:TemplateColumn>

	</columns>		

</asp:DataGrid>	

 

Quick Explanation

  1. Added asp:TemplateColumn
  2. Added ItemTemplate
  3. Added asp:HyperLink
    • Added NavigateUrl='<%# DataBinder.Eval(Container.DataItem, “eventLink”) %>’

 

SQL Server (v2005) – Reporting Services – Uninstall

Uninstalling Reporting Services (v2005)

Here are the steps to take when one wants to uninstall Reporting Services and keep all other components of a SQL Server v2005.

 

Steps

Outline

  1. Access Control Panel \Programs \ Program and Features
  2. From the list of Programs choose “Microsoft SQL Server 2005 ( 64 bit )”
  3. Right click your selection, Microsoft SQL Server 2005 ( 64 bit )
    • If you choose Remove
      • The “Component Selection” window appears, you will be asked to choose the Instance
      • The “Confirmation” window appears, and you will be asked to confirm you want to remove all the components of the Instance you selected earlier
      • As we do want to remove all components, please do not choose the “Remove” option
    • If you choose Change
      • The “Component Selection” window appears
        • Please choose the instance for which you want to remove the Reporting Services on
      • The “Feature Maintenance” window appear
        • Please choose “Reporting Services
        • Click the “Report” button to review the “Installation Report
        • The “Installation Report” details
          • The Instances and components of each Instance
          • The “Common Components”
        • The “Welcome” screen
        • The “System Configuration Check” screen
          • A dead red flag is
            • Pending Reboot Requirement
        • The “Change of Remove Instance” window appears
          • You are given a choice of “Change Installed Components” or “Remove Microsoft SQL Server”
            • Please choose “Change Installed Components”
            • If you were to choose “Remove Microsoft SQL Server” you will be removing all components; which is not what we want; we only want Reporting Services
        • The “Feature Selection” window appears
          • Right click “Reporting Services”
          • And, from the drop-down choose “Entire Features will not unavailable”
        • The “Error and Usage Report Settings” window appears
        • The “Ready to Update” window appears
          • Click the “Install” button
        • The “Setup Progress” window appears
          • Pay close attention and hope that all relevant steps complete successfully
        • The “Completing Microsoft SQL Server 2005 Setup” appears
          • Click the “Summary Log” button to review uninstall log

If you choose Remove

If you choose remove, you will be uninstalling the entire footprint for the Instance, Default or Named Instance

Component Selection

ComponentUninstall

Confirmation

Confirmation

 

Better, Choose Change

Programs and Features \ Uninstall or Change a program

Change-v3

 

Microsoft SQL Server 2005 Maintenance – Component Selection

ComponentSelection

 

Microsoft SQL Server 2005 Maintenance – Feature Maintenance

FeatureSelection

 

Microsoft SQL Server 2005 Maintenance – Feature Maintenance

If you click the Report button, you will see the “Installation Report” below

InstallationReport

 

Microsoft SQL Server 2005 – Welcome

Welcome

Microsoft SQL Server 2005 – System Configuration Check

SystemConfigurationCheck

Microsoft SQL Server 2005 – Change or Remove Instance

ChangeOrRemoveInstance

Microsoft SQL Server 2005 – Feature Selection

Original

FeatureSelection-Original

Transition

FeatureSelection-Transition

 

Modified

FeatureSelection-Modified

Microsoft SQL Server 2005  Reporting Services – Error and Usage Report Settings

ErrorAndUsageReportSettings

 

Microsoft SQL Server 2005  Reporting Services Setup – Ready to Update

ReadyToUpdate

 

Microsoft SQL Server 2005  Reporting Services Setup – Setup Progress

Reporting Services – Configuring Components

SetupProgress-20160727-0146PM

Reporting Services – Configuring Components

Setup Progress – The selected components are being configured

SetupProgress-20160727-0147PM

 

Microsoft SQL Server 2005  Setup – Completed

Completing Microsoft SQL Server 2005 Setup

CompletingMicrosoftSQLServerSetup

Summary Log

Click the Summary Log button to view Log….

Summary-txt

 

Microsoft SQL Server 2005  Setup – Completed

 

SQL Server – Reporting Services ( v2005 ) on Windows 2008 – Web Service Setting

Error

Reporting Services Configuration Manager – Configure Report Server – Web Services Identity – Red Exclamation Mark

WebServiceIdentity-Red (Cropped)

 

Reporting Services Configuration Manager – Configure Report Server – Web Services Identity – Set to new values

WebServiceIdentity-Setting-v2 ( Cropped )

Once Apply is clicked on…

ThereWasErrorSettingTheIdentity

 

Tell me more

Image

800708AC

Textual

 ReportServicesConfigUI.WMIProvider.WMIProviderException: An unknown error has occurred in the WMI Provider. Error Code 800708AC at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.SetWebServiceIdentity(String applicationPool) 

Remediation

Local Groups

Verified that the required local OS Groups are created and that Web Service Account has been added to the designated groups.

The OS Groups are

  1. SQLServer2005ReportingServicesWebServiceUser$<computer-name>$<instance-name>
  2. SQLServer2005ReportServerUser$<computer-name>$<instance-name>
  3. IIS_WPG

 

Group Intent Naming Convention Sample
 WebServiceUsers Members in the group have the required access to be assigned as the log on account for the associated instance of SQL Server Reporting Services in SQL Server 2005  SQLServer2005ReportingServicesWebServiceUser$<computer-name>$<instance-name>  SQLServer2005ReportingServicesWebServiceUser$HRDB$V2005MIRROR
 ReportServerUsers Members in the group have the required access and privileges to be assigned as the log on account for the associated instance of SQL Server Reporting Services in SQL Server 2005. SQLServer2005ReportServerUser$<computer-name>$V2005MIRROR  SQLServer2005ReportServerUser$HRDB$V2005MIRROR
 IIS_WPG  The IIS_WPG user is a the IIS Worker Process Group, and is needed in order for IIS to run / access applications within a folder.

The IIS_IUSRS is a the Internet Guest Account, this is used to allow anonymous access to the folder / files

 

 

WebServiceUsers

Original

WebServiceUsers-20160726-1055PM ( Original)

 

Revised

WebServiceUsers-20160726-1058PM ( Revised )

 

ReportServerUsers

ReportServerUsers-20160726-1053PM ( Original)

 

IIS_WPG

  1. Created a new group ( IIS_WPG)
  2. Added Web Service Account to group ( IIS_WPG)

IIS_WPG ( Created group & added Web Service)

Web Service Identity – Successfully Changed

WebServiceIdentity-SuccessfullyChanged ( Cropped)

 

Crediting

Crediting Dave Sells (MSFT ).

Answer provided

SQL Server > SQL Server Reporting Services, Power View
Set Web Service Identity to domain account
Here

…\Reporting Services\ReportServer\rsreportserver.config

WebServiceAccount is empty

Is WebServiceAccount Element is empty?

Here we have the WebServiceAccount Element marked as empty

WebServiceAccountIsEmpty

 

Please fill it with the account name, can be local account or domain name.

WebServiceAccountFilled

Causation

A mangled installation \ configuration can lead to the WebServiceAccount not being properly recorded in the rsreportserver.config.

 

Crediting

Crediting JoeUMN ( Profile ).

WebServiceAccountAsEmpty

Answer provided

SQL Server > SQL Server Reporting Services, Power View
Set Web Service Identity to domain account
Here

Virtual Directory Application Pool set incorrectly

There are two virtual directories ( Reports and ReportServer), either of them could be set incorrectly

To correct do the following:

  1. Launch Internet Information Services ( IIS ) Manager
    • Access the corresponding Web site and Virtual Directory ( by default “Default Web Site” \ “ReportServer” and “Default Web Site” \ “Reports” )
    • Right click on your selection
    • From the drop-down menu select “Manage Application” \ “Advanced Settings…”
    • The “Advanced Settings” window
      • In the “Application Pool” dropdown, review the Application Pool selected
        • In our case a former one was selected and so we changed to the new one

 

Access Website \ Virtual Directory – Application \ Manage Application \ Advanced Settings

LaunchApplicationAdvancedSettings

 

Website \ Virtual Directory – Application \ Manage Application \ Advanced Settings { Incorrect }

ApplicationAdvancedSettings-InCorrected

 

Website \ Virtual Directory – Application \ Manage Application \ Advanced Settings { Transitioning }

 

SelectApplicationPool

Website \ Virtual Directory – Application \ Manage Application \ Advanced Settings { Corrected }

ApplicationAdvancedSettings-Corrected

 

Crediting

Crediting JoeUMN ( Profile ).

ChangeApplicationPoolOnMsdn

Answer provided

SQL Server > SQL Server Reporting Services, Power View
Set Web Service Identity to domain account
Here

Summary

Our problem is that SQL Server v2005 targets MS Windows 2003, which has IIS_WPG.

MS Windows 2008 forsook IIS_WPG for IIS_IUSRS.

 

SQL Server Reporting Services – Management Studio

Background

One of the areas not often mentioned is accessing and configuring SQL Server Reporting Services ( SSRS ) through SQL Server Management Studio ( SSMS ).

 

SQL Server Management Studio

  1. Launch SQL Server Management Studio ( SSMS ) in administrator mode
    • Access Windows Desktop
    • From the Start menu, access SQL Server Management Studio
    • Right click on the selection, and from the drop down menu select “Run as administrator
  2. SSMS Launches and the Connect to Server Window appear
    • In the Connect To Server window
      • On the Server Type dropdown, Select “Reporting Services”
      • In the server name textbox, enter the server name
        • For a local default instance
          • Enter the name of the local machine or .
        • For a local named instance, enter “.\instance-name”
          • In our case “.\v2005MIRROR”
        • Authentication
          • Windows Authentication
            • As that is the only choice
  3. Configurable Options includes:
    • Server Properties
      • General
      • Execution
      • History
      • Logging
      • Permissions
    • Data Sources
    • Reports Folders and Individual Reports
    • Security
      • Users Roles
      • System Roles
    • Shared Schedules

ScreenShot

SSMS Launch – Run as administrator

SSMS-RunAsAdministrator ( cropped )

 

Connect To Server

ConnectToServer

 

Configurable Options

ConfigurableOptions

 

Shared Schedule

New Shared Scheduled

SharedScheduled-Marketing

 

Shared Schedules

 

ObjectExplorer - SharedSchedules

Subscription – Uses Shared Scheduled

SharedScheduled-Marketing-Subscription

 

SQL Server – Reporting Services ( v2005 ) on Windows 2008 – Application Pool Settings

Background

A quick and very brief catalog of possible problems one might encounter when configuring SQL Server Reporting Services (v2005) on MS Windows 2008/MS Windows 2008-R2.

Reporting Services COnfiguration on IIS is a broad topic and for the sake of brevity, we restrict our lenses mostly on the Application Pool.

Configuration

Application Pool

  1. .Net Framework version
    • .Net Framework v2.0.50727
  2. Managed pipeline mode
    • Use
      • Classic
    • Do not use
      • Integrated

Screen Shot

EditApplicationPool

 

Error

HTTP Error 500.23 – Internal Server Error – An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

 

Screen Shot

HTTP Error 500DOT23

Tabulated

Item Value
 Module ConfigurationValidationModule
 Handler  AboMapperCustom-7284591
 Error Code  0x80070032
 Logon Method  Not yet determined
 Logon User  Not yet determined

 

Remedy

Alternatively, switch the application to a Classic mode application pool – for example, appcmd set app “Default Web Site/” /applicationPool:”Classic .NET AppPool”. Only do this if you are unable to migrate your application.

 

Application Pool – View Settings

Sample


set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD list apppool "%_appPool%" /text:*

Output

Apppool-configuration-view

 

Application Pool – Change Setting – Managed Pipeline Mode

Change Managed Pipeline Mode from Integrated to Classic.

Sample


set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD set apppool "%_appPool%" /managedPipelineMode:Classic

Output

Apppool-configuration-set

 

 

Error – Could not find permission set named ‘ASP.Net’.

Screen Shot

CouldNotFindPermissionSetNamedASPNet

 

Textual

[ConfigurationErrorsException: Could not find permission set named 'ASP.Net'.]
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +361

[HttpException (0x80004005): Could not find permission set named 'ASP.Net'.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +1083

Tabulated

Item Value
ConfigurationErrorsException [ConfigurationErrorsException: Could not find permission set named ‘ASP.Net’.]
HTTP Exception HttpException (0x80004005): Could not find permission set named ‘ASP.Net’.]

 

Code

Application Pool – Change Setting – Managed Runtime Version

Change Managed Runtime Version to 2.0

Sample

set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD set apppool "%_appPool%" /managedRuntimeVersion:v2.0
Output

managedRuntimeVersionChangeCommandOutput

Error – Server unavailable

Screen Shot

ServerUnavailable

Textual

Service Unavailable

Service Unavailable

 

HTTP Error 503. The service is unavailable.

Application Pool – Start

Start application pool

Sample
set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD start apppool /apppool.name:"%_appPool%"

Output
appPoolStartOutput

Error – Illegal operation attempted on a registry key that has been marked for deletion. (0x800703fa)

Screen Shot

 

Textual

Remediation

The recommended remediation step is to launch Group Policy and

Computer Configuration->Administrative Templates->System-> UserProfiles -> Do not forcefully unload the user registry at user logoff.

Application Pool – Load User Profile – Current Setting

What is the Application Pools – Load User Profile – Current setting?

Sample
set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD list apppool "%_appPool%" /text:* | find "loadUserProfile"

Output

viewCurrentSetting-LoadUserProfile

Application Pool – Load User Profile – Set to true

Set Application Pools – Load User Profile to True

 

Sample
set "_appPool=AppPoolDomainServiceAccount"
%systemroot%\system32\inetsrv\APPCMD set apppool "%_appPool%" /processModel.loadUserProfile:true

Output

setLoadUserProfile

Win OS – Desktop

Access Control Panel \ User Accounts and review the list of users that have current profiles.

UserProfiles

 

Error – System.UnauthorizedAccessException.Access to the path … RSReportServer.config is denied

ScreenShot

eventViewer-WindowsLog-Application

 

Textual

 


Service cannot be started. Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information. ---> System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft SQL Server\v2005Mirror\MSSQL.4\Reporting Services\ReportServer\RSReportServer.config' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.ReportingServices.Diagnostics.Globals.Safe...

 

System.UnauthorizedAccessException: Access to the path ‘D:\Program Files\Microsoft SQL Server\v2005Mirror\MSSQL.4\Reporting Services\ReportServer\RSReportServer.config’ is denied

Remedy

Launch “Reporting Services Configuration Manager” and set\reset Windows Service Identity to your designated Service Account.

WindowsServerIdentity (Cropped)

 

References

IIS

Appcmd

  1. Getting Started with AppCmd.exe – By Mike VolodarskyNovember 16, 2007
    Link
  2. Start or Stop an Application Pool (IIS 7)
    Link

 

Application Pool – Error – “ILLEGAL OPERATION ATTEMPTED ON A REGISTRY KEY THAT HAS BEEN MARKED FOR DELETION”

  1. A COM+ application may stop working on Windows Server 2008 when the identity user logs off
    Link
  2. Ned Pyle (MSFT)User Profile Policies in Windows Server 2008 and Windows Vista
    Link
  3. RESOLVING ERROR “ILLEGAL OPERATION ATTEMPTED ON A REGISTRY KEY THAT HAS BEEN MARKED FOR DELETION.”
    Link
  4. Veritas – Events 6287, 45569, 3280, 3263, 6979, 7082 – Illegal operation attempted on a registry key that has been marked for deletion. (0x800703fa)
    Link
  5. thycotic – RESOLVING ERROR “ILLEGAL OPERATION ATTEMPTED ON A REGISTRY KEY THAT HAS BEEN MARKED FOR DELETION.”
    Link

 

Application Pool – Load User Profile

  1. IIS 7 Tip # 3 You can now load the user profile of the application pool identity
    Link