Quantcast
Channel: Configuration and Deployment
Viewing all 3561 articles
Browse latest View live

Encryption C# web config fails

$
0
0

I tried to encrypt web.config file using the commands .

  cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
    aspnet_regiis.exe -pc "CustomKeys16" -exp
    aspnet_regiis.exe -pa "CustomKeys16" "NT AUTHORITY\NETWORK SERVICE"
    aspnet_regiis -pef "connectionStrings" "C:\Users\cnandy\Desktop\Test\Websites\AccountDeduplicationWeb" -prov "CustomProvider"
    aspnet_regiis -px "CustomKeys16" "C:\Users\cnandy\Desktop\New folder\encrypt.xml" -pri

they work fine first time. 
Now after decryption and changing something in the web config connection string if I again try to encrypt using the commands it shows the errors.

C:\Windows\system32>cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -pc "CustomKey
s16" -exp
Creating RSA Key container...
The RSA key container already exists.
Failed!

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -pa "CustomKey
s16" "NT AUTHORITY\NETWORK SERVICE"
Adding ACL for access to the RSA Key container...
Succeeded!

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -pef "connectionSt
rings" "C:\Users\cnandy\Desktop\Test\Websites\AccountDeduplicationWeb" -prov "Cu
stomProvider"
Encrypting configuration section...
Succeeded!

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -px "CustomKeys16""C:\Users\cnandy\Desktop\New folder\encrypt.xml" -pri
Exporting RSA Keys to file...
Key not valid for use in specified state.

Failed!

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>pause
Press any key to continue . . .

Can't it be possible to re-run encryption and export successfully the key after modifying the web config once ? 
What am I doing wrong here ?


C# RSA Web Config Decryption Issue

$
0
0

I tried encrypting connection string of web config from an external C# application on my machine A . It was successful .

I exported the key .

The code snippet I tried looks like 

  private void encryptAndWrite(String FileName)
        {
            string strEntry = FileName.Replace("\\web.config", ""); // Let the user assign to this string, for example like "C:\Users\cnandy\Desktop\Test\Websites\AccountDeduplicationWeb"

            Process p = new Process()
            {
                StartInfo = new ProcessStartInfo("cmd.exe")
                {
                    RedirectStandardInput = true,
                    RedirectStandardOutput = true,
                    UseShellExecute = false,
                    CreateNoWindow = true
                }
            };

            p.Start();


            p.StandardInput.WriteLine(@"cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319");


            p.StandardInput.WriteLine("aspnet_regiis.exe -pc \"NewEncryptKey\" -exp");
            p.StandardInput.WriteLine("aspnet_regiis.exe -pa \"NewEncryptKey\" \"NT AUTHORITY\\NETWORK SERVICE\"");
            p.StandardInput.WriteLine("aspnet_regiis -pef \"connectionStrings\" {0} -prov \"NewEncryptProvider\"",strEntry);


            p.StandardInput.WriteLine("aspnet_regiis -px \"NewEncryptKey\" {0} -pri", KeyFileName);


            p.StandardInput.WriteLine("exit");

as it was a physical path I used -pdf option.

Now made the installer of this application and exported the key and the encrypted web config file to some other machine .

When I run the application in that other machine it flags "Failed to decrypt .. Key Container Not Found " error.

Though In my application decrypt method I have 

 string strEntry = FileName.Replace("\\web.config", ""); // Let the user assign to this string, for example like "C:\Users\cnandy\Desktop\Test\Websites\AccountDeduplicationWeb"

                Process p = new Process()
                {
                    StartInfo = new ProcessStartInfo("cmd.exe")
                    {
                        RedirectStandardInput = true,
                        RedirectStandardOutput = true,
                        UseShellExecute = false,
                        CreateNoWindow = true
                    }
                };

                p.Start();

                p.StandardInput.WriteLine(@"cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319");
                p.StandardInput.WriteLine("aspnet_regiis -pi \"NewEncryptKey\" " + KeyFileName);
                p.StandardInput.WriteLine("aspnet_regiis -pa \"NewEncryptKey\" \"NT AUTHORITY\\NETWORK SERVICE\"");
                p.StandardInput.WriteLine("aspnet_regiis -pdf \"connectionStrings\" " + strEntry);

                p.StandardInput.WriteLine("exit");

But if I run the commands directly from command prompt as an administrator that issue gets resolved. But it says 

Decrypting configuration section...
Failed to decrypt using provider 'NewEncryptProvider'. Error message from the pr
ovider: Not enough storage is available to process this command.
 (C:\Users\abalawan\Desktop\NewStuartCN\web.config line 35)

Not enough storage is available to process this command.

Failed!



What all things am I missing here ? 
I wrote down everything I tried . Please help .

Is it possible for IIS to cause wrong userid authentication insert ?

$
0
0

Is it possible for IIS to cause wrong userid authentication insert ?. My application is inserting wrong UserId, the application always insert 1 instead of the current authenticated UserId.

How do I increase the length of mp4 video upload length

$
0
0

How do I increase the length of mp4 video upload length
Am still getting error message after configuring web.conf file. <system.webServer ><security ><requestFilter> Maxquerystringlength = 524288000, and I also configured IIS manager and still am still getting error like, HTTP ERROR 500.19 - Internal server error. The requested page cannot be accessed because the related configuration data for the page is invalid.

WebDeployment to godaddy host fail in visual studio 2015

$
0
0

I have small 2 view app developed for test purpuroses in ASP.NET MVC with visual studio 2015 comunity.

I tried to deploy app with publish wizzard from visual studio, same way i did with VS 2013 and same host, but some errors occur when i try to publish it.

First, when i click on validate connection, everything goes fine. When i try to "preview changes" before publish, i got an "ERROR_USER_UNAUTHORIZED", and when i try to skip preview, and publish app without it, error is "ERROR_CERTIFICATE_VALIDATION_FAILED".

Also, when i try to execute command line , error is "ERROR_DESTINATION_NOT_REACHABLE"...

my publish first web application then display error

$
0
0

I am first time publish web application then not understood this type error please help me

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 remoely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

 

Decompiler DLL Project and The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

$
0
0

Not sure if this is the right forum for this problem, but here it it...

I have a problem in a DLL file that I need to debug. I do not have the original source code for the DLL file. I used reflector to decompile the DLL and create it as a project. I added it to my solution and then removed the original DLL reference in my main project and replaced it with a reference to the DLL project. My hope was that I could run it locally on Visual Studio's and set break points in the decompiled DLL project. However, I get the error:

Could not load file or assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

I have seen other posts on how to handle this with a DLL file, but I am dealing with the DLL as a separate solution in my project and am not sure what to do. Not sure it matters, but this is running on my local IIS server via Visual Studio's and is on .NET 2.0. Here is the Load Trace:

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 128:              this._MenuItems.Clear();
Line 129:            else
Line 130:              this._MenuItems.Add((object) menuItem);
Line 131:          }
Line 132:        }

Source File: C:\Users\eric.Last_Name\Desktop\ZuluControls\Menus\LeftMenuControl\LeftMenuControl.cs Line: 130

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52' could not be loaded.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files (x86)\IIS Express\iisexpress.exe --- A detailed error log follows.

=== Pre-bind state information === LOG: User = LISC-IT\Eric.Last_Name LOG: DisplayName = AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52 (Fully-specified) LOG: Appbase = file:///C:/Users/eric.Last_Name/Desktop/IISSERVER/ LOG: Initial PrivatePath = C:\Users\eric.Last_Name\Desktop\IISSERVER\bin

Calling assembly : ZuluControls, Version=1.0.0.2, Culture=neutral, PublicKeyToken=734e8cdd39728b61.

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\Users\eric.Last_Name\Desktop\IISSERVER\web.config

LOG: Using host configuration file: C:\Users\eric.Last_Name\Documents\IISExpress\config\aspnet.config

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.

LOG: Post-policy reference: AlphaSubRoutines, Version=1.0.0.10, Culture=neutral, PublicKeyToken=f9f2cc99cd30dc52

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/2bb6b3ce/3abdb25d/AlphaSubRoutines.DLL.

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/2bb6b3ce/3abdb25d/AlphaSubRoutines/AlphaSubRoutines.DLL.

LOG: Attempting download of new URL file:///C:/Users/eric.Last_Name/Desktop/IISSERVER/bin/AlphaSubRoutines.DLL.

WRN: Comparing the assembly name resulted in the mismatch: Major Version

ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

The Decompiled DLL AlphaSubRoutines, is being called from within another DLL called ZuluControls. I do not have the source code for the ZuluControls DLL either. I am not very knowledgeable about these things, but it looks like the ZuluControls DLL has a specific reference (version, Public Key, etc) to the AlphaSubRoutines DLL. Either the ZuluControls is referencing the wrong AlphaSubRoutines DLL or the AlphaSubRoutine DLL Project has the wrong identifying information.

Here is the AssemblyInfo.cs from the decompiled DLL Project:

// Assembly AlphaSubRoutines, Version 1.0.0.10

[assembly: System.Reflection.AssemblyCopyright("")] [assembly: System.Reflection.AssemblyTitle("Alpha Subroutines")] [assembly: System.Reflection.AssemblyDescription("Subroutines Created for Alpha Applications")]

[assembly: System.Reflection.AssemblyConfiguration("")]

[assembly: System.Reflection.AssemblyCompany("Alpha Industries, Inc.")]

[assembly: System.Reflection.AssemblyProduct("")]

//[assembly: System.Reflection.AssemblyKeyFile(@"....\AlphaSubRoutines.snk")]

[assembly: System.Reflection.AssemblyTrademark("")]

//[assembly: System.Reflection.AssemblyDelaySign(false)]

[assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations | System.Diagnostics.DebuggableAttribute.DebuggingModes.EnableEditAndContinue | System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | System.Diagnostics.DebuggableAttribute.DebuggingModes.Default)]

[assembly:System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)]

//[assembly: System.Reflection.AssemblyKeyName("AlphaSubRoutines")]

[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)]

I had to comment out three lines to get it to build without error, could that be part of the problem ? Any help would be appreciated !!

My project's path in web deployment package

$
0
0

I created a web deployment package for a web application project.  It was created in a release folder in the root of the C drive.  I noticed a long series of folders in the zip file that I can drill down in.   Why is this replication of my file system in this deployment package?

It's similar to below:

C:\Releases\MyProject..Web.zip\Content\C_C\Users\[myself]\Documents\Visual Studio 2013\Projects\[My project directory]\[MyProject].Web\obj\Release


Could not find part of the path....

$
0
0

This project published yesterday fine. Today I made some changes basic changes, like added a custom error page, and tried to republish it when I got this error.  I think I may see the issue, but don't know how to correct it, if it is the cause.

The error below has same  "obj\Release\AspnetCompileMerge\Source\" part of the path twice, but I don't understand why.  The build process may be doing this.  I think it's looking for this and can't find it because it doesn't exist.  Please let me know if I'm wrong about this.

Error : Copying file obj\Release\AspnetCompileMerge\Source\ReportViewer\js\telerikReportViewer-9.1.15.731.min.js to obj\Release\AspnetCompileMerge\Source\obj\Release\AspnetCompileMerge\Source\ReportViewer\js\telerikReportViewer-9.1.15.731.min.js failed. Could not find a part of the path 'obj\Release\AspnetCompileMerge\Source\ReportViewer\js\telerikReportViewer-9.1.15.731.min.js'.

Any ideas on the cause and/solution for this?

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

$
0
0

Hi 

I have this error

and I did the following on my web.config (I added <pages enableViewStateMac="false" />) on web.config

<system.web><compilation debug="true" targetFramework="4.5.2" /><httpRuntime targetFramework="4.5.2" /><pages enableViewStateMac="false" /></system.web>

I had no luck, it didn't solved my problem .

Any help, please?

Thank you

mario

NuGet Package Manager Dialog does not open

$
0
0

All,

I am using VS 2012. I was able to open NuGet Package Manager, but it stopped opening (Right Click on Reference -> Manage NuGet Packages.. option) after i was trying to update to new version. Does any one know how to fix it? Worst case i will reinstall VS

thanks!

Is IIS 7.5 capable of hosting applications targeting .NET Framework 4.6?

$
0
0

I am still running my development software on Windows 7 and IIS 7.5. I've upgraded to Visual Studio version 2015 though. I just want to make sure that IIS 7.5 can host .NET Framework 4.6 applications on Windows 7. The only selection in IIS 7.5 under "Application Pools" is "v4.0". 

So is IIS 7.5 good for .NET 4.6 and will it be good for .NET 5.0? 

Thanks for reading

IIS ReWrite Remove .ASPX

$
0
0

Hi Everyone,

    I am trying to write a re-write script to remove the .aspx from my extensions. Below are what I need to do and hoping someone can help me. This is obviously in the web.config unless there is an easier way.

1) Remove .aspx syntax from the url line for the entire site

2) Allow URL to be either /about or /about.apsx

3) Make it so if someone types in /about.aspx/ or /about/ that is removes the trailing /

4) That the main default.aspx is completely removed on the main page.

The below works for 1 & 2 but does not work for 3 & 4. Basically make it work like duocircle.com/about-us or http://imgmodels.com/

<rewrite><rules><rule name="Remove .aspx from URL" stopProcessing="true"><match url="(.*)\.aspx$" /><action type="Redirect" url="/{R:1}" /></rule><rule name="Add .aspx for non-existing files or directories"><match url="(.*)" /><conditions><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="/{R:0}.aspx" /></rule></rules><outboundRules><rule name="Remove .aspx from links in the response" preCondition="Only for HTML"><match filterByTags="A, Area, Base, Form, Frame, IFrame, Link, Script" pattern="(.*)\.aspx(\?.*)?$" /><action type="Rewrite" value="{R:1}{R:2}" /></rule><preConditions><preCondition name="Only for HTML"><add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /></preCondition></preConditions></outboundRules></rewrite><urlCompression doStaticCompression="false" doDynamicCompression="false" />

Appreciate any help.

Terry

Deploy Project Not Connecting to ConnectionString DB

$
0
0

My application contains two db contexts, ApplicationDbContext (for Identity stuff) and DbContext (for all else).  My conn string specifies a SQL Server database and the DbContext functions correctly, but when I try to log in (ApplicationDbContext) the site throws a SQL connection error and indicates it cannot find SQL "Express" which is what I use locally.

The connection string does not specify a SQL Express instance (see below).  Any ideas as to where else a reference to my local db/SQL Express might live?

<connectionStrings><add name="myConnection" connectionString="Data Source=myServer;Initial Catalog=myDB;User ID=me;Password=myPassword" providerName="System.Data.SqlClient" /></connectionStrings>

Error message:

Server Error in '/' Application.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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. 

SQLExpress database file auto-creation error: 

The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

If the application is running on either Windows 7 or Windows Server 2008R2, special configuration steps are necessary to enable automatic creation of the provider database. Additional information is available at: http://go.microsoft.com/fwlink/?LinkId=160102. If the application's App_Data directory does not already exist, the web server account must have read and write access to the application's directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
If the application's App_Data directory already exists, the web server account only requires read and write access to the application's App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the application's App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server account's credentials are used when creating the new database.
Sql Server Express must be installed on the machine.
The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.


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: 


[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +92
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType) +372
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +172
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +849
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +320
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken) +591
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +5699747
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) +38
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +507
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +154
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +21
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +90
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +166
   System.Data.SqlClient.SqlConnection.Open() +96
   System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +75

[HttpException (0x80004005): Unable to connect to SQL Server database.]
   System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +125
   System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +89
   System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +29
   System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +386

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0

Event ID 1000 during long endurance test with GCserver enabled

$
0
0

Hello,

I got the following error for a couple of times when running an endurance test for 10 hours (with GCserver enabled)

<div class="c"><Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"></div> <div> <div class="e"> <div class="c">-<System></div> <div> <div class="e"> <div> <ProviderName="Application Error" /></div> </div> <div class="e"> <div> <EventID Qualifiers="0">1000</EventID></div></div> <div class="e"> <div> <Level>2</Level></div> </div> <div class="e"><div> <Task>100</Task></div> </div> <div class="e"> <div> <Keywords>0x80000000000000</Keywords></div> </div> <div class="e"> <div> <TimeCreatedSystemTime="2015-09-18T21:07:22.000000000Z" /></div> </div> <div class="e"> <div> <EventRecordID>261315</EventRecordID></div> </div> <div class="e"> <div> <Channel>Application</Channel></div> </div> <div class="e"> <div> <Computer>UPN</Computer></div> </div> <div class="e"> <div> <Security/></div> </div> <div> </System></div> </div> </div> <div class="e"> <div class="c">-<EventData></div> <div> <div class="e"> <div> <Data>w3wp.exe</Data></div> </div> <div class="e"> <div> <Data>8.5.9600.16384</Data></div> </div> <div class="e"> <div> <Data>52157ba0</Data></div> </div> <div class="e"> <div> <Data>clr.dll</Data></div> </div> <div class="e"> <div> <Data>4.0.30319.34209</Data></div> </div> <div class="e"> <div> <Data>5348961e</Data></div> </div> <div class="e"> <div> <Data>c00000fd</Data></div> </div> <div class="e"> <div> <Data>004226a2</Data></div> </div> <div class="e"> <div> <Data>d20</Data></div> </div> <div class="e"> <div> <Data>01d0f25120c95528</Data></div> </div> <div class="e"> <div> <Data>C:\Windows\SysWOW64\inetsrv\w3wp.exe</Data></div> </div> <div class="e"> <div> <Data>C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll</Data></div> </div> <div class="e"><div> <Data>40a0f77c-5e49-11e5-94b6-005056aa03d0</Data></div> </div> <div class="e"> <div> <Data/></div> </div> <div class="e"> <div> <Data/></div> </div> <div> </EventData></div> </div> </div> <div> </Event></div> <div></div> <div>When I searched for a fix, I got the following </div> <div></div> <div>

Event 2

Log Name: Application
Source: Application Error
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic

Description:
Faulting application name: <Application name>, version: <Application Version>, time stamp: 0x4e11b8da
Faulting module name: clr.dll, version: 4.0.30319.235, time stamp: 0x4da4281c
Exception code: 0xc0000005
Fault offset: 0x0000000000037413
Faulting process id: 0x1b4c
Faulting application start time: 0x01cc3aed2d08224a
Faulting application path: <path>
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 0bdfb3f5-a6f9-11e0-acdb-0024e854572f


CAUSE

The issue occurs because an object that is being referenced is dereferenced by the garbage collector in common language runtime 4 (CLR4). Therefore, an access violation occurs during garbage collection or when the application tries to access the released object.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have the .NET Framework 4 installed.

Restart requirement

You must restart the computer after you apply this hotfix if the affected files are being used. We recommend that you close all instances of Microsoft Visual Studio and all .NET Framework-based applications before you install this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zonetab in the Date and Time item in Control Panel. 
</div> <div></div> <div>

https://support.microsoft.com/en-us/kb/2640103

How do I get the hot fix? or is there any remediation?

Thanks,

Pingala

</div> <div></div> </div>

What is the possible solution if the asp.net hosting provider does not allow .exe files which I require for Roslyn Compiler?

$
0
0

I have developed a responsive asp.net website using Visual Studio 2015 Community  by choosing the default ASP.NET Forms template . On my local computer, the website runs perfectly fine, but when I uploaded all the files of the website to the internet server, I found that I am not able to upload three files with .exe extension namely "csc.exe","vbc.exe" and "VBCSCompiler.exe" under the path "/Bin/roslyn". I raised a ticket to my hosting provider net4india and they are saying that they don't allow .exe files to be uploaded on server as they may be potential viruses.  I had earlier developed this website on Visual Studio 2010 and was working perfectly fine on the hosting server also , but I wanted to make it responsive and I don't know how to use bootstrap, so I had choosen the template for ready-made coding, but now this is a big problem.  I have googled a lot on this issue, but not found anything even near to what I am facing , even on stackoverflow. How can I resolve this issue ? Is any work-around possible for this like converting the .exe to .dll files or anything like that ? Please help.

200K upload limit since moving servers

$
0
0

Hi All

We have a site on some shared hosting and the server was compromised, so the hosting company set up some new space for us. We download the site then uploaded it to the new space.

Since then though we are no longer able to upload files larger than 200K. I have checked the web.config file and it still says requestLimits maxAllowedContentLength="2000000000", so everything is fine there.

I have been in touch with the hosting company who were about as helpful as you'd expect them to be and the only thing they could tell me was the old server was running IIS7 and the new one is IIS8.

Now bearing that in mind is it likely to be a server side setting I need to get the hosting company to update or would it be a scripting issue with our ASP since moving from 7 to 8, or possibly something different altogether?

Any help solving this would be much appreciated as I'm a bit out my depth here.

Thanks

CONNECTION STRING : [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

$
0
0

Hi Guys...

i wrote connection string inside web.config file, and i'am using mssql 2008 database.

<connectionStrings><add name="sqlserverconnection" connectionString="Data Source=myserver\sqlexpress;Initial Catalog=database_test;User ID=sa;Password=password" providerName="System.Data.SqlClient"/></connectionStrings>

i got error message inside the browser like this  : [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

what the means of error message above ? how to fix it ? 

Thanks & Regards,
Bertanya

How to solve "Could not load file or assembly ..." error?

$
0
0

Hello,

I have some reports in my application, and I remember that I had to update the report services to 11.0.0 some time ago in order to get my things work.

However, when I publish my application to my web server, I keep getting errors because of missing assemblys, like the one below.

What I am doing repeatedly is:

  • Identify the missing assembly, e. g. "Microsoft.SqlServer.Types" like below.
  • Locate the assembly in my project's Reference section.
  • Set "copy local" to true for this assembly.

However, I find that some assemblies are not in my Reference section. I have to add them, in order to set "copy local" to true. But how can my application work without them locally?

Finally, is this the recommended way of solving such errors?

What's going on here?

Thanks
Magnus

Server Error in '/' Application.

Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

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.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace: 


[FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.]
   Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.Write(Object obj, Boolean verify, Boolean assertOnInvalidType) +0
   Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.WriteVariantOrPersistable(Object obj) +73
   Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateHashForCachedDataSets() +273
   Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +92
   Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateIntermediateFormat(Byte[] definition, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +82
   Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, IDataProtection dataProtection, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +165
   Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection) +204

[ReportProcessingException: An unexpected error occurred in Report Processing.]
   Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection) +989
   Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) +203

[DefinitionInvalidException: The definition of the report 'apl/psv/rpt/Empfang2/Empfang.rdlc' is invalid.]
   Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) +269
   Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot) +228
   Microsoft.Reporting.LocalService.CompileReport() +29
   Microsoft.Reporting.LocalService.Microsoft.Reporting.ILocalProcessingHost.CompileReport() +5
   Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() +61

[LocalProcessingException: An error occurred during local report processing.]
   Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() +150
   Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters) +58
   Governica.apl.psv.rpt.Empfang2.Empfang2.bindReport(Int32 idx) +612
   Governica.apl.psv.rpt.Empfang2.Empfang2.Page_Load(Object sender, EventArgs e) +101
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249

Dynamically created page - how to add routing

$
0
0

Hello friends,

I have a dynamic webform that allows me to generate dynamically new aspx.

        protected void Button1_Click(object sender, EventArgs e)
        {

            string yymmdd = DateTime.Now.ToString("yyMMdd");
            string path1 = Server.MapPath("~/DayToDay/" + yymmdd + "/");
            if (!Directory.Exists(path1))
            {
                Directory.CreateDirectory(path1);
            }

            DynamicTemplate dt = new DynamicTemplate();
            dt.PageTitle = TextBox1.Text;

            
            dt.Contentbody = TextBox1.Text;

            dt.GeneratePage();
            System.IO.File.WriteAllText(path1 + dt.PageTitle + ".aspx", dt.DynamicPage);

        }

I create the new aspx pages all right.  My problem is that under runtime, the newly created aspx webform give me a 404 Error.

I need help as to how to implement routing on this.

Thank you

Viewing all 3561 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>