I am trying to duplicate an existing DNN portal that I have for testing purposes by creating a duplicate of the database and duplicating the .net files into a new folder.
After I copied the site and changed the webconfig to point to the new site and changed the alias in the database I am getting this error.
This webpage has a redirect loop.
The webpage at http://xxx.us/xxx/default.aspx has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here's a list of common causes for DNN redirect loops:
1) You are setting the trust level to
medium and using the 1.0.61025.0
version of System.Web.Extensions.
Update the trust level to full and and
update ALL occurrences of
System.Web.Extensions to 3.5.0.0 in
the web.config (assuming .NET 3.5
framework is installed).
Original:
<trust level="Medium"... ...
...System.Web.Extensions,
Version=1.0.61025.0...
Updated:
<trust level="Full"... ...
...System.Web.Extensions,
Version=3.5.0.0...
You should also check if there is a System.Web.Extensions.dll (version 1.0.61025.0) in the /bin directory. If no compiled module is dependent on this assembly version, you can remove the file. Otherwise, use assembly redirection in the web.config runtime section:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
2) You have a trailing slash in the
HTTPAlias field in the PortAlias
table, remove it.
JAllen, in my experience, this is an incorrectly formatted PortalAlias record.
My suggestion is to try a few extra iterations.
Examples:
"localhost" works for me, but "localhost/" does not.
"www.domain.com" works, but "domain.com" does not. (because domain.com is not bound in IIS, whereas www.domain.com is"
The specific value that goes into your PortalAlias table depends upon your IIS bindings. You may also need to check your hosts file to verify that localhost is available to you
C:\Windows\System32\drivers\etc\hosts
In over 20 DNN deployments, this has caused me some pain a handful of times, at least.
I struggled with this issue for a solid day and I can add an item to the list of common causes:
Cannot communicate with SQL Server
After disabling TLS1.0 and SSLv3 for a PCI compliance scan, we started getting the error: ERR_TOO_MANY_REDIRECTS. I could ping the server and could login to the server(from SSMS on the database server), but when I tried making an ODBC connection from the web server to the database, it failed.
It would try to hit the home page (and fail), then continuously tried to redirect to the UnderConstruction page, failing each time until we got the error.
I had to re-enable TLS1.0 to get it working, but definitely a short term fix.
Related
We are envisioning a product that will have a web front end and mobile apps on multiple platforms (Xamarin). I've already turned a breeze angular hot towel example into a web front end. I am tasked with investigating splitting apart the breeze web client and the breeze server back end. The main reason for this is the mobile devs could potentially use breeze sharp to save their objects to the same breeze back end. It seems like a bad idea to have the breeze web client and server coupled so tightly. I duplicated the project and stripped out the necessary parts on each end to decouple them.
The part I can't figure out is how to get them to talk to each other again. I briefly looked into connectionString, but that doesn't seem to be the right answer. Any ideas on how to get them talking again would be appreciated.
Edit: 20140725 14:23
I've been trying to resolve this on and off since yesterday. I looked into connectionStrings in Web.config and found that that was dead end. Another post made me think that appSettings in Web.config.
I found a parameter in config.js named remoteServiceName. The previous value was "breeze/Breeze" I changed it to
'http://localhost:4545/breeze/Breeze'
The web client still fails:
Error retrieving data.Metadata query failed for: http://localhost:4545/breeze/Breeze/Metadata; HTTP response status 0 and no message. Likely did not or could not reach server. Is the server running? Error: Metadata query failed for: 'http://localhost:4545/breeze/Breeze/Metadata'; HTTP response status 0 and no message. Likely did not or could not reach server. Is the server running?'
When I run that link in its own tab I get metadata.
What did I strip out?: The breeze controller, models, repository (c# only), dbcontext, and BreezeWebApiConfig
Edit 20140725 14:52
Sorry I missed the exception before the one mentioned above:
XMLHttpRequest cannot load http://localhost:4545/breeze/Breeze/Metadata. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:53555' is therefore not allowed access.
Thank you to everyone for the clues you provided in the comments!
The first part of the answer I already included in my edits above:
I found a parameter in config.js named remoteServiceName. The previous value was "breeze/Breeze" I changed it to
'http://localhost:4545/breeze/Breeze'
That got the client talking attempting to talk to the remote server.
After that the CORS issue stumped me. The three following links helped me solve this issue:
Using Breeze with a WebApi Service from another domain
WebAPI CORS and Ninject
http://msdn.microsoft.com/en-us/magazine/dn532203.aspx
You have to install the CORS packages. From the microsoft article:
First, in order to get the CORS framework, you must reference the CORS libraries from your Web API application (they’re not referenced by default from any of the Web API templates in Visual Studio 2013). The Web API CORS framework is available via NuGet as the Microsoft.AspNet.WebApi.Cors package. If you’re not using NuGet, it’s also available as part of Visual Studio 2013, and you’ll need to reference two assemblies: System.Web.Http.Cors.dll and System.Web.Cors.dll (on my machine these are located in C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages).
The next step was to add a few lines to the config file from the webapi-cors-and-ninject stackoverflow post:
<system.webServer>
<handlers>
</handlers>
<httpProtocol>
<customHeaders>
<!-- Adding the following custom HttpHeader will help prevent CORS from stopping the Request-->
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>
Obviously this is a very insecure solution and shouldn't be used for anything other than a development environment.
I am trying to download setup DotNetNuke on my development PC, which contains IIS7 and SQL Server 2008. I have followed the instructions here: http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/19/View/Details/How-To-Install-DotNetNuke-On-Your-Computer.aspx.
When I navigate to localhost nothing happens. When I navigate to this page in Firefox it says: Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
I have looked at lots of post entries and tried different things. This looked promising but did not help: http://www.dotnetnuke.com/Resources/Forums/forumid/107/threadid/180233/scope/posts.aspx.
Most of the suggestions seem to be for developers that are upgrading websites. Is there a log file anywhere that can tell me exactly what the problem is?
The logs can be found in /Portals/_default/Logs .
You can increase the log sensitivity by editing DotNetNuke.log4net.config. Use
<level value="All" />
for the most detailed log messages.
<level value="Error" />
may also work if All provides too much info.
I have created a PivotViewer application with an Azure Web role, and it deploys on my local machine perfectly. When I deploy it to azure, the standard default.aspx "My ASP.NET" application is the loaded page. I can not seem to find a solution in all of the tutorials. If I point the browser to http://solution.cloudapp.net/MyAzureStartPage.aspx, I can also find a perfect deployment, but I can't seem to get the proper home page.
Determining which page to load if none is explicitly specified is a function of the web server. Without configuration changes, the web server is never going to expect to look for your custom page.
Can you not simply rename your desired start page default.aspx? That would be the simplest approach.
Add defaultDocument element in your web.config under configuration/system.webServer node. Something like this will get your default page defined:
<defaultDocument enabled="true">
<files>
<add value="MyAzureStartPage.aspx"/>
</files>
</defaultDocument>
I developed a DotNetNuke application and hosted it on a web server. When I browse the site, I am getting the following error:
Server Error in '/' Application.
Runtime Error Description: An
application error occurred on the
server. The current custom error
settings for this application prevent
the details of the application error
from being viewed remotely (for
security reasons). It could, however,
be viewed by browsers running on the
local server machine.
Details: To enable the details of this
specific error message to be viewable
on remote machines, please create a
<customErrors> tag within a
"web.config" configuration file
located in the root directory of the
current web application. This
<customErrors> tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web> </configuration>
Notes: The current error page you are
seeing can be replaced by a custom
error page by modifying the
"defaultRedirect" attribute of the
application's <customErrors>
configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/>
</system.web> </configuration>
Can any one tell me how to resolve the problem...
The main problem here is that you aren't getting any detail about what the error. Any success achieved while troubleshooting this without exposing some more detail (or knowledge of your setup) is going to be pretty close to pure luck.
I would suggest following the instructions that this default error message is giving you and editing the web. config file. The file is named "web.config" and it lives in the root of the website.
Open the file and search for "RemoteOnly", you should see something that says customErrors mode="RemoteOnly". Change the "RemoteOnly" to "Off" and save the file. The next time you browse to the site you should see a more detailed error message. Please share that with us here in the form of an update to your current post or as a new question (which I recommend, as it technically will be a different question).
Also, I recommend making a backup copy of the web.config file first before making any changes.
You need to check if your ASP.NET is functional. Since you didnt post any details on your web server, i would recommend you check if you have .NET 2.0 installed and your web server is configured to use it.
You can run aspnet_regiis -i in the c:\WINDOWS\Microsoft.NET\Framework\v2.x.x.x. directory to re-register the aspnet modules.
You might also want to check if your virtual directories have the execute permission enabled.
When you say you "developed a DotNetNuke application" I need more information.
Did you develop a DotNetNuke MODULE?
If so, did you install it on a DotNetNuke site that was working before, but isn't now?
I have an application written in Delphi 7 which does not require an admin privilages to run.
For some reason I am able to save files to c:\windows and c:\windows\system32 from within the application even though the application has not requested UAC elevation. I am logged in as an admin with UAC turned on and I haven't changed any of the default UAC settings. The files actually show up under Windows Explorer as well. I am not using the 'Run as Administrator' option.
If I try to do the same thing using WordPad under the same profile I get an error as expected.
Any ideas what is going on?
Th application is using Ole Structured Storage to save and includes the following manifest, if that helps.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="DelphiApplication" version="1.0.0.0" processorArchitecture="*"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Edit: To be clear my application does not save anything to these locations by default. I am choosing these locations via the standard file save dialog.
Update
I have found out why my application was being treated as legacy despite including the above manifest. It turns out a 2nd manifest was also being included which did not have the 'trustInfo' section. I have removed this 2nd manifest and all is well now.
Thanks for all the help
This is a feature of UAC to make old applications compatible with Vista. It redirects any request to write to a system folder that the user lacks permission to a local folder.
They are stored under "AppData\Local\VirtualStore" folder under the current user's profile.
There is a group policy setting to disable this feature: "Virtualize file and registry write failures to per-user locations"
This file and registry virtualization features are designed to allow legacy applications to run under Windows Vista standard user accounts. Legacy application is defined as a 32-bit executable without a specific Vista manifest. If you provider a Vista manifest to decorate your application as Vista-compatible, this virtualization setting won't affect your application (as in your Wordpad example)
Mark Russinovich has a great article on this: Inside Windows Vista User Account Control
I am running as an admin with UAC turned on.
Do you mean that you are logged on as Administrator or do you mean that you run your Delphi application with the option "Run as administrator" (i.e. with an elevated token)?
If the latter is the case than your application will have permission to write to C:\Windows.
The files will end up in a virtual location under your user directory, unless you have UAC disabled.