Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Wednesday, February 10, 2016

Cannot Load Visual Studio Project

Error:

The Web Application Project SomethingGood.Api is configured to use IIS. The Web server 'http://www.localhost.com/api' could not be found.


One possible cause of this error is when you configured your IIS 10 to accept wildcard in host name, think subdomain, or multi-tenant website. To fix it, do Unload Project, then edit the csproj, then change the IISUrl to something like this:

<IISUrl>http://*.localhost.com/api</IISUrl>

Thursday, September 11, 2014

Trusted connection string is not allowed on IIS?

Trusted connection string format doesn't work when in IIS..


cfg.DataBaseIntegration(c =>
    {
        c.Driver<NHibernate.Driver.SqlClientDriver>();
        c.Dialect<NHibernate.Dialect.MsSql2008Dialect>();
        c.ConnectionString = "Server=.;Database=RideOfYourLife;Trusted_Connection=True";

        c.LogSqlInConsole = true;
        c.LogFormattedSql = true;                    
    });


.., the error cascades to ServiceStack as:
response Status
error CodeExceptionmessageError trying to resolve Service 'Marshaller.TheServices.ReservationResourceService' or one of its autowired dependencies (see inner exception for details)



The error is not helpful at all, so I tried to wire a simple IoC-injected object, that is an object with no database connection, and voila, the error gone!


Tracked the error in connection string, must change it to standard format:

cfg.DataBaseIntegration(c =>
    {
        c.Driver<NHibernate.Driver.SqlClientDriver>();
        c.Dialect<NHibernate.Dialect.MsSql2008Dialect>();
        c.ConnectionString = "Server=.;Database=RideOfYourLife;User Id=sa; Password=opensesame;";

        c.LogSqlInConsole = true;
        c.LogFormattedSql = true;                    
    });


I have yet to find out how to make trusted connection string work on IIS


Happy Coding!

Monday, February 14, 2011

Error on sqlite_open

If you encounter this error on IIS

PHP Fatal error: Call to undefined function sqlite_open()


Uncomment this:

extension=php_sqlite.dll

And this:

extension_dir = "ext"

Thursday, December 16, 2010

HTTP Error 500.19 - Internal Server Error

If you received this error when configuring an application in IIS


Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.


Add the IIS_IUSRS and IUSR to your application directory permission. Right click the application on IIS, select Edit Permissions..., click Security tab, click Edit... button; on Enter the object names to select, paste this: IIS_IUSRS; IUSR. Click OK, click OK, refresh the erring page


Here's the video: http://www.youtube.com/watch?v=v5VMGYlGfag

Saturday, October 2, 2010

Login failed for user IIS APPPOOL\DefaultAppPool troubleshooting

This error...


Cannot open database "SportsStore" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\DefaultAppPool'.
A severe error occurred on the current command.  The results, if any, should be discarded.



...has this solution:


Open Microsoft SQL Server Management Studio

Go to Logins node under Security.

Add a new Login, name it: IIS APPPOOL\DefaultAppPool



Then select the User Mapping on left pane, then check the Map column of your database (e.g. SportsStore).  Then check the db_owner on Database role membership of your user IIS APPPOOL\DefaultAppPool on your database SportsStore

Thursday, September 30, 2010

ASP.NET IIS Errors troubleshooting

If you have this kind of error when you tried to run your ASP.NET app on IIS


HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.


or this:

HTTP Error 500.21 - Internal Server Error

Handler "BlockViewHandler" has a bad module "ManagedPipelineHandler" in its module list


just do this:
Windows Logo > Run

type this:
cmd.exe

then press:
Ctrl+Shift+Enter

that shortcut key triggers running cmd.exe with an Administrator rights

then type this on terminal:
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i