Posts

Showing posts with the label IIS

An attempt was made to load a program with an incorrect format” even when the platforms are the same

Image
change "Enable 32-Bit Applications" to "TRUE". Restart your website and it should work. OR In  Visual Studio , Right Click your  project  -> On the left pane click the  Build  tab, under  Platform Target  select x86 (or more generally the  architecture  to match with the library you are linking to) I hope this helps someone! :)

Crystal report error (Load report failed) in asp.net

There are various reason for this error. in the following list all may cause this problem 1. public static ReportDocument rep = new ReportDocument(); protected void Page_UnLoad( object sender, EventArgs e) { this .CrystalReportViewer1.Dispose(); this .CrystalReportViewer1 = null ; rep.Close(); rep.Dispose(); GC.Collect(); }     2. crystal report assemblies installed on your machine do not reflect the assemblies you have on your web.config 3. crystal version installed on the server is different with the one you want to invoke from your site 4. application pool where your reports run is not set to LOCAL SERVICE 5. read and write permission is not enabled on your root folder 6. crystalreportviewer folder is not copied to your operating folder.      7. lack of permission in following directory The fix : When Crystal Reports opens a file, it uses the Windows temporary folder (typically  C:\W...

Get BaseURL With Publish Folder Name in IIS

var baseUrl = '@Request.ApplicationPath';         if (baseUrl == "/") {             baseUrl = "";         }         console.log(baseUrl);

Login failed for user IIS APPPOOL\DefaultAppPool

Run This Script :  CREATE LOGIN [IIS APPPOOL\DefaultAppPool] FROM WINDOWS GO --USE Table Name GO CREATE USER [IIS APPPOOL\DefaultAppPool] FOR LOGIN [IIS APPPOOL\DefaultAppPool] GO EXEC sp_addrolemember 'db_datareader', 'IIS APPPOOL\DefaultAppPool' GO EXEC sp_addrolemember 'db_datawriter', 'IIS APPPOOL\DefaultAppPool' GO