SSRS Report Parameters grayed out after postback - sql-server

We have a website that uses Microsofts Report Viewer control (version 12). The server is SQL-Server 2012. Up until a week ago it worked fine. We have a report that when it opens asks for a start date from a list. This works fine and causes a postback that populates the end date list. HOWEVER, when the form comes back now both the start and end dates are grayed out.
LoadAsync is false.
KeepAlive is true.
Tried with cookies turned on and off.
Tried using Report Viewer version 11 instead.
Checked the web.config for problems.
Any ideas?
Here's what the web.config file looks like (set up for report viewer version 11)
<configuration>
<system.web>
<httpCookies requireSSL="false"/>
<sessionState timeout="20" mode="InProc" cookieless="false" />
<compilation targetFramework="4.5">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.webServer>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</handlers>
</system.webServer>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>

Turns out that the aspx report page that contained the report viewer control has a script that fired on postback and that script reference a missing file.

Related

This program is blocked by group policy. in godaddy windows hosting

I am trying to execute a .exe file through Scheduled Tasks in Godaddy but when this task is run there is an error of
"This program is blocked by group policy".
Application is a C# console application.
In the web.config, comment out everything within <system.codedom>. GoDaddy blocks it.
<!--<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>-->

SqlMembershipProvider not compatible with this version

I generated a script for my aspnet Database, now when I try to use the database it gives an error
The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'. However,
the current database schema is not compatible with this version. You
may need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.
What options do I really have to solve this problem?
Do I need to run aspnet_regsql.exe or is there a way to get around this error besides having to go with this option as the error suggests?
My web.config file looks like this:
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<membership defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="CPMS_DB"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="false"
maxInvalidPasswordAttempts="3"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="3"
applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ApplicationServices"
applicationName="/"/>
</providers>
</profile>
<roleManager enabled="true">
<providers>
<clear />
<add connectionStringName="ApplicationServices"
applicationName="/"
name="AspNetSqlRoleProvider"
type="System.Web.Security.SqlRoleProvider" />
<add applicationName="/"
name="AspNetWindowsTokenRoleProvider"
type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
I would use the aspnet_regsql.exe to create a new/blank database.
Then you could use this:
http://granadacoder.wordpress.com/2007/11/29/membershipprovider-helper-to-transfer-data/
It will "create tsql code" so you can move all your data into your blank database.
I had similar error, 'simple' solutions like closing the project and re-opening, rebuilding, resolves the error. that's if you're sure you did everything correctly

Getting error "The user instance login flag is not supported on this version of SQL Server." but not using this flag

I recently upgraded a SQL Server Express database I was using locally to SQL Server 2012 Developer. I started getting this error. A quick search pulls up tons of posts where the answer seems to be to remove User Instance=True; from your connection strings.
I checked and none of my connection strings have this flag. I tried searching the entire solution for "user instance" just to make double sure and it doesn't show up anywhere. Doubly weird is that I don't get this error right away. The first couple calls to the database work...
Has anyone else had a similar experience?
Here is the exact code that is causing my error:
public class BetterAuthorizeAttribute : AuthorizeAttribute
{
public override void OnAuthorization(System.Web.Mvc.AuthorizationContext filterContext)
{
var roleList = Roles.Split(',');
//if the user is in one of the roles in the list
foreach (string r in roleList)
{
if (filterContext.HttpContext.User.Identity.IsAuthenticated)
{
//The error is consistently thrown here the second time this line
//executes...
if (filterContext.HttpContext.User.IsInRole(r.Trim()))
{
Here are the config sections I thought were relevant:
<connectionStrings>
<add name="BioSphereContext"
providerName="System.Data.SqlClient"
connectionString="Server=fake;Database=fake;User ID=fake;Password=fake;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;MultipleActiveResultSets=true;" />
</connectionStrings>
.
.
.
<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="15">
<providers>
<add name="DefaultSessionProvider"
type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</sessionState>
.
.
.
<entityFramework>
<defaultConnectionFactory
type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
Some more details about my project in case it helps...
VS 2012
Entity Framework 5
Azure SDK 2.0
ASP.NET MVC 3
.net 4.5
This code uses ASP.NET Membership Roles Provider
if (filterContext.HttpContext.User.IsInRole(r.Trim()))
The machine.config shows
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
Pointing to "LocalSqlServer" in the same file
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
There is the User Instance.
TODO: Configure your roleManager to use either another roles provider or the AspNetSqlRoleProvider to use a different connection string.
same goes for session (What is DefaultConnection? i don't see a connection string named like this), membership and profile.
So try:
<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="15">
<providers>
<add name="DefaultSessionProvider"
type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
connectionStringName="BioSphereContext" applicationName="/" />
</providers>
</sessionState>
Not sure what was wrong, but I deleted and re-cloned my git repository. Error went away.... never getting that day back... lol. I'll leave the post in case any of this is helpful to others.

Silveright config error stopped

Server Error in '/' Application.
I have just started to publish the app to IIS server but it is failing, any ideas on this how to solve?
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\PBM_Test\web.config line 15)
Source Error:
Line 13:
Line 14:
Line 15: Line 16:
Line 17:
Source File: C:\PBM_Test\web.config Line: 15
this is the web.config.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, `enter code here`System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</modules>
<validation validateIntegratedModeConfiguration
="false" />
</system.webServer>
<system.web>
<httpModules>
<add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</httpModules>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
</system.web>
<connectionStrings>
<add name="PBMEntities" connectionString="metadata=res://*/ModelPBM.csdl|res://*/ModelPBM.ssdl|res://*/ModelPBM.msl;provider=System.Data.SqlClient;provider connection string="data source=SRVORDERS;initial catalog=PBM;user id=OK;password=OK1;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
</configuration>
see http://forums.silverlight.net/t/180719.aspx/1
and http://community.discountasp.net/showthread.php?t=10296 for info
The above threads describe how you have to make sure that your web application has a copy of this file available.
If you are using a server you can install software to, the best solution is to make sure that the server has both the latest version of .net and RIA services installed (Both may be separate installations) (EDIT - make sure all the packages that alfonso list are installed.)
If you don't have access to install software on the server, the other solution is to make sure that ServiceMode.DomainServices.Hosting 4.0 is copied to the BIN folder during deployment of your ASP solution - set the file properties to Local Copy / Only if Newer
Make sure you have installed all of these packages on the server:
Silverlight4 Tools
Silverlight SDK
RiaServicesToolkit
RiaServices
Hope it helps!

How do I make DbProviderFactories for SQL Server

I get the same error as the guy in http://sqlite.phxsoftware.com/forums/t/239.aspx but the thing is he uses SQLite and I use SQL Server 2008 and adding that code don't change anything for me I still get the
Unable to find the requested .Net Framework Data Provider. It may not be installed.
I am trying to get the MVC 3 account to work with my websites database and changed the connectionstring to my own in web.config
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="madsskipper_dk_dbEntities" applicationName="/"/>
</providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="madsskipper_dk_dbEntities" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="madsskipper_dk_dbEntities" applicationName="/"/>
</providers>
</roleManager>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="madsskipper_dk_dbEntities" applicationName="/"/>
</providers>
</sessionState>
From the name of your connection string, it seems as if you may have specified an Entity Framework connection string.
If so, you need to add a SqlClient connection string, and change your providers to use the SqlClient connection string.

Resources