I am receiving the following error trying to view a report in Report Manager and Reporting Services: "
Your browser does not support scripts or has been configured not to allow scripts" I have ensured that scripting is enabled and added the site to my trusted sites and still does not work. What am I missing? I am using SQL Server 2008 R2. My reports work fine in a test windows application, but not in the browser.
I can see the header and footer of the report and the toolbar, but the body is empty. It's only when I select view source that I see the error.
Here is the complete error when I View Source:
<div>
Your browser does not support scripts or has been configured not to allow scripts.
<span id="ctl31_ReportViewer">
<div id="ctl31" onclick="if ($get('ctl31_ctl04') != null && $get('ctl31_ctl04').control != null) $get('ctl31_ctl04').control.HideActiveDropDown();" onactivate="if ($get('ctl31_ctl04') != null && $get('ctl31_ctl04').control != null) $get('ctl31_ctl04').control.HideActiveDropDown();" style="height:100%;width:100%;"></div>
<div id="ctl31_HttpHandlerMissingErrorMessage" style="border-color:Red;border-width:2px;border-style:Solid;padding:10px;display:none;overflow:auto;font-size:.85em;">
<h2>
Report Viewer Configuration Error
</h2>
<p>The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebUserInterface, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.web/httpHandlers section of the web.config file, or add <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebUserInterface, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.webServer/handlers section for Internet Information Services 7 or later.</p>
</div>
<span id="ctl31_ctl03"><input type="hidden" name="ctl31$ctl03$ctl00" id="ctl31_ctl03_ctl00" /><input type="hidden" name="ctl31$ctl03$ctl01" id="ctl31_ctl03_ctl01" /></span><input type="hidden" name="ctl31$ctl10" id="ctl31_ctl10" /><input type="hidden" name="ctl31$ctl11" id="ctl31_ctl11" />
<div id="ctl31_AsyncWait" style="background-color:White;opacity:0.7;position:absolute;display:none;filter:alpha(opacity=70);">
I even get these errors in a test web application, even though scripting is enabled and my httpHandlers are defined in my web config for both system.web and system.webserver.
Related
UPDATE: This is the code that kills functionality of firebase. If I try to download from firebase a couple of seconds after this code (waiting with await Task.Delay, no other code running), it starts sending the code -13000, httpResult = 0 exception. The same request earlier works. Map works.
GoogleMapFragment gmf = new GoogleMapFragment(context, this);
FragmentTransaction ft = activity.FragmentManager.BeginTransaction();
ft.Add(mapLayout.Id, gmf, "my_fragment");
ft.Commit();
I wanted to have google map on layout in the same activity where I work with firebase. Map works, but somehow it interferes with firebase, which work only before creating Google map. Any ideas what can cause this?
Update 2: If I download small file before initializing google maps, I can later use firebase, so I 'solved' the issue in a little dirty way but at least I can continue working. After this 'fix' I get following error in the output but file is downloaded anyway. I must continue digging, for now I hope the worst is over...
error getting token java.util.concurrent.ExecutionException: com.google.firebase.FirebaseApiNotAvailableException: firebase-auth is not linked, please fall back to unauthenticated mode.
Old version of question:
I checked all possible answers here on SO for my question, but nothing brought me to right way. There's quite obvious output telling me that something is wrong, but I have no idea how to solve the issue. There's an answer in this question that one of possible reasons for HttpResult = 0 is that google play version on phone isn't actual enough. I used the method recommended for check and I have Google Play services 11.5.18 installed on phone. I have Xamarin.Firebase.Storage 42.1021.1 (10.2.1) installed and using Visual Studio 2015. Quite often I had to clean and rebuild and it sometimes worked, but not this time. In android properties I have Compile using android version 7.1 Nougat. I created firebase account just recently, not knowing much about this, added it in google console to existing project (as I already use google maps), filled sha1 code the same way I did with maps. Added google-services.json and set it's build action on GoogleServiceJson. No more actions I know about.
Here is my code, I tried various ways to download, upload, but this one seems to be good example:
FirebaseApp fba=FirebaseApp.InitializeApp(context);
firebaseStorage = FirebaseStorage.Instance;
firebaseStorageReference = firebaseStorage.GetReferenceFromUrl("gs://alien-chess.appspot.com");
firebaseStorageReference=firebaseStorageReference.Child("settings.dat");
byte[] bytes = new byte[1000];
firebaseStorageReference.PutBytes(bytes).AddOnFailureListener(new FirebaseFailureListener(this));
Here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="AlienChessAndroid.AlienChessAndroid" android:versionCode="1" android:versionName="1.0" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:label="Alien Chess" android:icon="#drawable/Alien" android:largeHeap="true">
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
</application>
And here are what I think are important parts from the output window
Failed to retrieve remote module version: V2 version check failed
Local module descriptor class for com.google.android.gms.firebasestorage not found.
Considering local module com.google.android.gms.firebasestorage:0 and remote module com.google.android.gms.firebasestorage:0
NetworkRequestFactoryProxy failed with a RemoteException:
com.google.android.gms.dynamite.DynamiteModule$zza: No acceptable module found. Local version is 0 and remote version is 0.
....
Unable to create a network request from metadata
android.os.RemoteException
....
StorageException has occurred.
An unknown error occurred, please check the HTTP result code and inner exception for server response.
Code: -13000 HttpResult: 0
There isn't much c# sources for visual studio and I can't read that easily recommendations for android studio as they are quite different for unskilled programmers.
Any ideas what other things should I check?
► Problem: Anyone can access a webpage, but I only want logged in users to be authorized to access it.
Background:
Web Server = IIS 8
Server OS = Windows Server 2012
Framework = .NET 4.5
Environment = .\WebFolder\logon.aspx, .\WebFolder\inside.html
Website = Simple logon page ("logon.aspx") that guards an html page ("inside.html").
Users = External people (ie, non-intranet)
Sample URLs:
A. "www.webpage.com/logon.aspx"
B. "www.webpage.com/inside.html"
Desired Outcome:
Everyone can access the "logon.aspx" page
Only logged on users can access the "inside.html" page
Any direct attempts to access "B" will trigger a redirect to "A"
No additional use of program code
Prior Attempts:
I've been fiddling with the web.config file (authentication & authorization), but to no avail (501 Server Error, 401 Authorization Error, Runtime Application Error).
Web.Config File:
<system.web>
<authentication>
<forms name=".ASPXFORMSAUTH" loginUrl="logon.aspx" protection="All" timeout="1" path="/" slidingExpiration="true" requireSSL="false" />
</authentication>
<authorization></authorization>
</system.web>
Bottom line: I'm sure this is a very basic/easy thing to configure, it's just that I haven't been able to do it so far. Plus, I do not want to write any additional code in order to accomplish a seemingly fundamental task.
Thanks in advance!
Okay, I figured it out (after 7 hours). It requires four things (based on the example file structure):
1. Using the FormsAuthentication module
VS2012 → Project → Your credentials/authentication code → Use FormsAuthentication.RedirectFromLogin(_var1_, _var2_) instead of Response.Redirect(inside.html)
2. Adding a new node in the web.config file
<system.webServer><handlers><add name="HTMLHandler" type="System.Web.StaticFileHandler" path="*.html" verb="GET" /></handlers>
3. Including the 'defaultUrl' attribute in the Forms tag
<forms name=".ASPXFORMSAUTH" loginUrl="logon.aspx" defaultUrl="inside.html" protection="All" timeout="1" path="/" slidingExpiration="false" requireSSL="false" />
4. Adding a location tag authorization restriction to the 'web.config' file
<location path="inside.html"><system.web><authorization><deny users="?" /></authorization></system.web></location>
See my comments (below) for an explanation of each of these four pieces.
An admin updated the dev and test servers by adding Report Viewer 2012 for me.
I have no access to the test server, but am admin on the dev server. I can work with someone who has admin access to the test server, but I will need to know what to look for.
My SSRS reports deployed from Visual Studio 2012 were converted to Microsoft.ReportViewer.WebForms 11.0 from version 10.0.
These reports work just find on my dev server, but when my QA tester uses the report, the first time the page shows the error "The request failed with HTTP status 400: Bad Request."
Note that no report is loaded by default.
Once we request a report, this report shows up properly and the error message disappears.
I am trying to remove this initial error message, as it is confusing for the end user.
Does anybody have any idea?
Thanks in advance!
Below is the code as shown by developer tools.
<DIV id=ctl00_Body_ReportViewer1_ctl09_VisibilityState ForNonReportContentArea="true" NewContentType="Microsoft.Reporting.WebFormsClient.ReportAreaContent.Error"><INPUT name=ctl00$Body$ReportViewer1$ctl09$VisibilityState$ctl00 value=Error type=hidden> </DIV><INPUT id=ctl00_Body_ReportViewer1_ctl09_ScrollPosition name=ctl00$Body$ReportViewer1$ctl09$ScrollPosition value="0 0" type=hidden><SPAN id=ctl00_Body_ReportViewer1_ctl09_Reserved_AsyncLoadTarget></SPAN>
<DIV style="DISPLAY: none" id=ctl00_Body_ReportViewer1_ctl09_ReportControl><SPAN></SPAN><INPUT name=ctl00$Body$ReportViewer1$ctl09$ReportControl$ctl02 type=hidden><INPUT name=ctl00$Body$ReportViewer1$ctl09$ReportControl$ctl03 type=hidden><INPUT id=ctl00_Body_ReportViewer1_ctl09_ReportControl_ctl04 name=ctl00$Body$ReportViewer1$ctl09$ReportControl$ctl04 value=100 type=hidden> </DIV>
<DIV style="WIDTH: 100%; HEIGHT: 100%" id=ctl00_Body_ReportViewer1_ctl09_NonReportContent>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 8pt">
<UL>
<LI style="DISPLAY: inline">The request failed with HTTP status 400: Bad Request.</LI></UL></DIV></DIV>
This is the code in the aspx file:
<asp:UpdatePanel ID="TFD_UP" runat="server">
<ContentTemplate>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
ProcessingMode="Remote" Height="100%" Width="100%" PromptAreaCollapsed="True"
ShowParameterPrompts="False" ShowPromptAreaButton="False"
ShowBackButton="False" ShowFindControls="False" ShowPrintButton="False"
ShowRefreshButton="False" ShowZoomControl="False"
></rsweb:ReportViewer>
<rsweb:ReportViewer runat="server"></rsweb:ReportViewer>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnClick" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Long story short, upgraded a 2008 solution to 2013, deployed fine initially and then started having this on deploy of all but two reports. Tracing the service calls in Fiddler showed what looked like garbage in the password field of the data-source. Once I re-entered the password on each failing report's data-source the errors went away.
You probably have access to a folder with the correct permissions (or the report item itself) and not to the directory. Check the permissions to the directory by going to the SSRS Server directly generally:
http: (servername)/Reports
Click 'Folder Settings' and then security should come up. You should add relevant users here if you want the root of the connection to not pop up errors. Generally speaking SSRS can be item config set, directory of child items (which may also be more directories), or root directory set. The main landing page generally when connecting in code to SSRS is the point shown above unless you specify in code behind or a config some other starting point.
I am using Nlog with MYsql as target database.
MY configuration is as below:
<target name="databaselog" type="Database" keepConnection="true"
useTransactions="false"
dbProvider="MySql.Data.MySqlClient"
connectionString="Server=localhost;Database=****;User ID=****;Password=****;Connect Timeout=5;"
commandText=" insert into logs(time_stamp,logger,message,log_level) Values(#TIME_STAMP,#LOGGER,#MESSAGE,#LOGLEVEL)">
<parameter name="#TIME_STAMP" layout="${longdate}"/>
<parameter name="#LOGGER" layout="${logger}"/>
<parameter name="#MESSAGE" layout="${message}"/>
<parameter name="#LOGLEVEL" layout="${level:uppercase=true}"/>
</target>
.
Still not able to insert the info or any level message in MYSql DB.
Can anyone please help me out ?
bye the I also tried command text as
insert into logs(time_stamp,logger,message,log_level) Values(?,?,?,?)
but not able to insert the data in mysql db.
From NLog docs:
NLog is designed to swallow run-time exceptions that may result from logging. The following settings can change this behavior and/or redirect these messages.
<nlog throwExceptions="true" /> - adding the throwExceptions attribute in the config file causes NLog to stop masking exceptions and pass them to the calling application instead. This attribute is useful at deployment time to quickly locate any problems. It’s recommended to set throwExceptions to "false" as soon as the application is properly configured to run, so that any accidental logging problems won’t crash the application.
<nlog internalLogFile="file.txt" /> - adding internalLogFile causes NLog to write its internal debugging messages to the specified file. This includes any exceptions that may be thrown during logging.
<nlog internalLogLevel="Trace|Debug|Info|Warn|Error|Fatal" /> – determines the internal log level. The higher the level, the less verbose the internal log output.
<nlog internalLogToConsole="false|true" /> – determines whether internal logging messages are sent to the console.
<nlog internalLogToConsoleError="false|true" /> – determines whether internal logging messages are sent to the console error output (stderr).
Right click on NLog configuration file. Set value to "Copy always" of property "Copy to Output Directory"
I'm trying to upload a 20 meg file using the upload control and it's working fine on visual studio's built in webserver but once I publish it to the production server (which I have no access to) I keep getting the following error :
Server Error in '/' Application.
--------------------------------------------------------------------------------
Maximum request length exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Maximum request length exceeded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.]
System.Web.HttpRequest.GetEntireRawContent() +11140903
System.Web.HttpRequest.GetMultipartContent() +72
System.Web.HttpRequest.FillInFormCollection() +245
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +11072199
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124
System.Web.UI.Page.DeterminePostBackMode() +83
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +270
--------------------------------------------------------------------------------
I've added the following to my system.web node so i don't know what the real issue is.
<httpRuntime executionTimeout="800" maxRequestLength="51200" />
Any direction on this would be very helpful.
If config file change doesn't work, please try to update property httpRuntime executionTimeout="9200" maxRequestLength="200000"> directly from IIS.
For reference:
Although you have a 20Mb file, it is possible that encoding or other content on the page causes the 50Mb limit you have set to be exceeded. I recommend doubling your current setting.
There is also another web.config setting that could come into play: security request filtering maxAllowedContentLength.
This default to 30MB, but could be set differently in your environment.
The web.config entry would be something along the lines of:
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1550000000" maxQueryString="16384" />
<fileExtensions>
<add fileExtension="." allowed="true" />
</fileExtensions>
</requestFiltering>
</security>