Google

Monday, February 13, 2012

.NET - Remove all characters from sting except letters and numbers and spaces

   result = Text.RegularExpressions.Regex.Replace(StringToBeModified, "[^0-9a-zA-Z ]", "")

Tuesday, February 7, 2012

Crystal Reports - The server requires a username and password.

in my case crystal report needed to access some shared folder on the server. 
because program was moved to another server, it couldn't find this folder.





DataLib.BackOffice_Close()

DataLib.BackOffice_Open()
crDiskFileDestinationOptions.DiskFileName = fileLocation &
Private Sub ExportPDF(ByVal strLocID As String, ByVal strInvID As String)Dim crExportOptions As ExportOptionsDim crDiskFileDestinationOptions As New DiskFileDestinationOptionsDim crFormatTypeOptions As New PdfRtfWordFormatOptionsDim fileLocation As String = file://servername/folder%20name/"INV_" & strLocID & "_" & strInvID & ".pdf"strPDFFileLocation = crDiskFileDestinationOptions.DiskFileName
Session.Item(
crExportOptions = crDoc.ExportOptions

  .ExportDestinationType = ExportDestinationType.DiskFile
  .ExportFormatType = ExportFormatType.PortableDocFormat
  .DestinationOptions = crDiskFileDestinationOptions
  .FormatOptions = crFormatTypeOptions
"AttachmentLocation") = strPDFFileLocationWith crExportOptionsEnd WithTry  crDoc.Export()

  Response.Write(ex.Message)
  Response.End()
Catch ex As ExceptionEnd TryEnd Sub

Thursday, February 2, 2012

IIS 7 Error Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

- Modify Application Pool Settings in IIS
  Go to IIS, Select ServerName, click Application Pools, select Application Pool, click "Set Application Pool Defaults", change load user profile to True

IIS 7 - Error Error message when you visit a Web site that is hosted on IIS 7.0: "HTTP Error 500.0 – Internal Server Error"

Error message when you visit a Web site that is hosted on IIS 7.0: "HTTP Error 500.0 – Internal Server Error"

 

- Comment out (delete) the following part of web.config
      <!-- <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web,
      Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />-->

Error means this has been declared somewhere else.

Wednesday, February 1, 2012

Monday, January 9, 2012

Error asenumerable' is not a member of 'system.data.datatable'

Error asenumerable' is not a member of 'system.data.datatable' To resolve - add reference to System.Data.DataSetExtensions.dll (Project, Add Reference, Recent)

Error expression of type 'object' is not queryable

Error expression of type 'object' is not queryable - To resolve set option infer to on (right click project, properties, compile)