Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9001765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:28:48+00:00 2026-06-16T00:28:48+00:00

When I start the application from Visual Studio 2010 the following error shows up:

  • 0

When I start the application from Visual Studio 2010 the following error shows up:

Value cannot be null.\r\nParameter name: username

I can see this error in Global.asax.cs in the parameter sender of this method:

    void Application_Error(object sender, EventArgs e)
    {
    }

The problem is that I’m not using username anywhere and my web.config

    <configuration>
      <connectionStrings>
        <add name="MYSQL"
             connectionString="Driver={MySQL ODBC 5.2w Driver};Server=server_name;Database=database_name;uid=my_user_id;pwd=my_pwd"
             providerName="System.Data.Odbc"/>
      </connectionStrings>
      <system.web>
         <compilation debug="true" targetFramework="4.0" />
      </system.web>
  </configuration>

Any help will be welcome.

EDIT:

More information:

What I can see is:

sender.base.Profile.base.base.Session = '((System.Web.HttpApplication)(sender)).Session' threw an exception of type 'System.Web.HttpException' 

and

sender.Profile.base.LastActivityDate = '((System.Web.Profile.ProfileBase)(((ASP.global_asax)(sender)).Profile)).LastAct‌​ivityDate' threw an exception of type 'System.ArgumentNullException' 

and

sender.Profile.base.LastActivityDate.base = {"Value cannot be null.\r\nParameter name: username"}

EDIT

This code works without any problem, and also I can execute queries.

    void Application_Start(object sender, EventArgs e)
    {
        string ConnStr = System.Configuration.ConfigurationManager.ConnectionStrings["MYSQL"].ConnectionString;
        OdbcConnection con = new OdbcConnection(ConnStr);
        con.Open();
        con.Close();
     }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:28:49+00:00Added an answer on June 16, 2026 at 12:28 am

    For some reason this error only happens when I run the application from Visual Studio and not when it is deployed in IIS.

    Thank you for your help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Visual Studio 2010 Windows Forms application in which I start a
Suppose we start from scratch in Visual Studio 2010 and add a 'WCF Service
I am using Visual Studio 2010 to create a Silverlight 4 application. I set
In my C# application (using Visual Studio 2010 ultimate) the user needs to select
I have a small windows application I wrote using Visual Studio 2010, CSharp, .NET
I have an application that runs perfectly when I run it from Visual Studio.
C# Visual Studio 2010 Express: When my application starts up, even before showing my
I have developed an application using C# on Visual Studio 2010 and SQL Server
I'm trying to publish a .NET 4.0 application to a web server using Visual Studio 2010
I'm having problem from a while (since I'm using visual studio 2010 I think).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.