ELMAH MVC Route not displaying - elmah

I just installed ELMAH.Mvc and left all the default configurations and I am able to get to the elmah route and see my log. however, when i deploy my application I get a 403 Forbidden Access page. I thought since I had the requiresAuthentication flag set to false it would be available. Here are my settings:
<add key="elmah.mvc.disableHandler" value="false" />
<add key="elmah.mvc.disableHandleErrorFilter" value="false" />
<add key="elmah.mvc.requiresAuthentication" value="false" />
<add key="elmah.mvc.IgnoreDefaultRoute" value="false" />
<add key="elmah.mvc.allowedRoles" value="*" />
<add key="elmah.mvc.allowedUsers" value="*" />
<add key="elmah.mvc.route" value="elmah" />
<add key="elmah.mvc.UserAuthCaseSensitive" value="true" />
any help would be great!

doh! I needed to add this to my web.config:
<security allowRemoteAccess="yes" />

Related

How to run multiple django applications on IIS server?

I am new in django that runs on IIS server. I have manage to set up server that one django application/site is runnging..now I want to add another django application/site to this server. I cant find anywhere the sample web.config how to do that..
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
<mimeMap fileExtension=".config" mimeType="application/xml" />
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
</staticContent>
<handlers>
<add name="Python FastCGI"
path="/page1/*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\python27\python.exe|c:\python27\lib\site-packages\wfastcgi.pyc"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="WSGI_HANDLER" value="page1.wsgi.application" />
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\page1" />
<add key="DJANGO_SETTINGS_MODULE" value="page1.settings" />
</appSettings>
</configuration>`
This is my config so far, how can I add another django site that will be available on URL/page2/ ?
To create a new site click on the server name and add a new website.
enter your site folder path and binding detail.
and copy your old web.config file to the new create site folder and make changes that you want.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
<mimeMap fileExtension=".config" mimeType="application/xml" />
<mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
</staticContent>
<handlers>
<add name="Python FastCGI"
path="/page2/*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\python27\python.exe|c:\python27\lib\site-packages\wfastcgi.pyc"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="WSGI_HANDLER" value="page2.wsgi.application" />
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\page2" />
<add key="DJANGO_SETTINGS_MODULE" value="page1.settings" />
</appSettings>
</configuration>
Note: use python version after 3.6 with iis if possible.

Nuget Server Repository - Page not found 404

I'm totally desperate. I've been trying to install Nuget.Server v3.2.1.0 for two days now.
I followed the installation instructions at https://learn.microsoft.com/de-de/nuget/hosting-packages/nuget-server, but it doesn't work.
I suspect that the routing doesn't work properly.
My Web.config looks like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation strict="false" explicit="true" debug="true" targetFramework="4.6" />
<!-- maxRequestLength is specified in Kb -->
<httpRuntime targetFramework="4.6" maxRequestLength="30720" />
</system.web>
<appSettings>
<add key="aspnet:UseHostHeaderForRequestUrl" value="true" />
<add key="requireApiKey" value="true" />
<add key="apiKey" value="MyApiKey" />
<add key="packagesPath" value="D:\TFS-Workspaces\Fachit360\Playground\NuGet Server\NuGet Server\Packages" />
<add key="cacheFileName" value="" />
<add key="allowOverrideExistingPackageOnPush" value="false" />
<add key="ignoreSymbolsPackages" value="true" />
<add key="enableDelisting" value="false" />
<add key="enableFrameworkFiltering" value="false" />
<add key="enableFileSystemMonitoring" value="true" />
<add key="allowRemoteCacheManagement" value="false" />
<add key="initialCacheRebuildAfterSeconds" value="15" />
<add key="cacheRebuildFrequencyInMinutes" value="60" />
</appSettings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<remove name="WebDAV" />
</handlers>
<staticContent>
<remove fileExtension=".nupkg"/>
<mimeMap fileExtension=".nupkg" mimeType="application/zip" />
</staticContent>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="31457280" />
</requestFiltering>
</security>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
...
</assemblyBinding>
</runtime>
</configuration>
And here is my development environment:
- Visual Studio 2017 Pro (15.9.12)
- Windows 10 Enterprise LTSC
- IIS Express 10.0 (Visual Studio integrated)
The installation is very simple. The overview page is also displayed:
What I find confusing is that the Default.aspx file contains the following:
Click here to view your packages.
And in the file NuGetODataConfig.cs the following is configured:
NuGetV2WebApiEnabler.UseNuGetV2WebApiFeed(
config,
"NuGetDefault,
"nuget"
"PackagesOData,
enableLegacyPushRoute: true);
Anyway, when I click on "Click here to view your packages", I get the error: "Page not found - 404".
Does anyone have an idea why that might be? I am at the end of my Latin.
Many greetings
Update
I forgot to mention that I also tried to release the project on a Windows Server 2012 R2. Exactly the same problem.
And it's strange that you can find the following packages in my project references:
- Nuget.Core
- Nuget.server
- Nuget.Server.Core
- Nuget.Server.V2
Then why does the start page talk about Nuget.Server 3.2.1.0?

deployment of a web.config to amazon beanstalk

When I deploy a .net web application to Amazon Beanstalk, my local web.config gets completely ignored and it just gets replaced with this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="PARAM3" value="" />
<add key="PARAM4" value="" />
<add key="PARAM1" value="" />
<add key="PARAM2" value="" />
<add key="PARAM5" value="" />
<add key="AWS_SECRET_KEY" value="" />
<add key="AWSSecretKey" value="" />
<add key="AWS_ACCESS_KEY_ID" value="" />
<add key="AWSAccessKey" value="" />
</appSettings>
</configuration>
I thought that beanstalk wasn't able to parse some section of my web.config so I simplified the web.config to the minimum:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="mykey" value="myvalue"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
</system.web>
</configuration>
And I get the same result. my appSettings and every other section of my web.config don't appear in the web.config that gets deployed.
I looked everywhere and I can't find documentation on this.
I don't have any transforms in my local application (i.e. no web.release.config file).
Can I disable this "feature" of Beanstalk somehow?
I don't ask for any action, I just want my original web.config deployed.
Set the environment variables in the Elastic Beanstalk console, not in your git repository.

Sitecore 8 - Mongo automation DB

I am setting up Sitecore 8 and a few of the blogs mention the “automation.live”, “automation.history” DBs.
Example
But in the official documentation there is no mention of these
Does anyone know what “automation.live” & "“automation.history” are for, and if they are required?
Your example blog relates to an early pre-release version of the xDB, and I don't think it's accurate now.
It's likely that the function of those databases has now been picked up by "tracking.live", "tracking.history" and "analytics".
Here is the connection strings file from one of my local Sitecore 8 implementations:
<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
<!--
Sitecore connection strings.
All database connections for Sitecore are configured here.
-->
<add name="core" connectionString="Data Source=.;Initial Catalog=sc80rev150121Sitecore_core;Integrated Security=False;User ID=sa;Password=secret" />
<add name="master" connectionString="Data Source=.;Initial Catalog=sc80rev150121Sitecore_master;Integrated Security=False;User ID=sa;Password=secret" />
<add name="web" connectionString="Data Source=.;Initial Catalog=sc80rev150121Sitecore_web;Integrated Security=False;User ID=sa;Password=secret" />
<add name="analytics" connectionString="mongodb://localhost:27017/sc80rev150121_analytics" />
<add name="tracking.live" connectionString="mongodb://localhost:27017/sc80rev150121_tracking_live" />
<add name="tracking.history" connectionString="mongodb://localhost:27017/sc80rev150121_tracking_history" />
<add name="tracking.contact" connectionString="mongodb://localhost:27017/sc80rev150121_tracking_contact" />
<add name="reporting" connectionString="Data Source=.;Initial Catalog=sc80rev150121Sitecore_reporting;Integrated Security=False;User ID=sa;Password=secret" />
</connectionStrings>

Required dependency of type Elmah.Mvc.ElmahController could not be resolved

Elmah is logging errors properly to my database but I can't get to /elmah. What am I missing? This was working without ever implementing a controller for Elmah, but now it's not working. This is following a git merge. All configuration has been reset to how it was working before.
<system.web>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
<appSettings>
<add key="elmah.mvc.disableHandler" value="false" />
<add key="elmah.mvc.disableHandleErrorFilter" value="false" />
<add key="elmah.mvc.requiresAuthentication" value="false" />
<add key="elmah.mvc.IgnoreDefaultRoute" value="false" />
<add key="elmah.mvc.allowedRoles" value="*" />
<add key="elmah.mvc.allowedUsers" value="admin" />
<add key="elmah.mvc.route" value="elmah" />
</appSettings>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
<elmah>
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="[MyCSName]" />
</elmah>
</system.webServer>
I realise this is an old question but it was the top google search result.
Another option if you want to continue using Funq is pass the additional assemblies you want scanned to funq.
Change
new ServiceStack.Mvc.FunqControllerFactory(container);
To
new FunqControllerFactory(container, typeof(ElmahLogger).GetAssembly(), typeof(ElmahController).GetAssembly())
I am also using ServiceStack, this is what worked for me:
ControllerBuilder.Current.SetControllerFactory(new FunqControllerFactory(container,
typeof (ElmahController).Assembly));
This most likely happens because you are using ServiceStack Funq IOC.
In App_Start\AppHost.cs (name may varies), try commenting out this line:
//Set MVC to use the same Funq IOC as ServiceStack
//ControllerBuilder.Current.SetControllerFactory(new ServiceStack.Mvc.FunqControllerFactory(container));
Regards.