.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

beginning asp.net 3.5 in C#

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net

Hello, I am reading Beginning ASP.NET 3.5 in C# 2008 and I ran into a problem.

I am trying to get the source code to work in visual studio 2010. When I "F5"

any given page I recieve 1 warning and 1 error.

Warning 1 C:\Web\Beginning ASP.NET 3.5\Chapter07\StateManagement\CrossPage1.aspx: ASP.NET runtime error: Section or group name 'scriptResourceHandler' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Web\Beginning ASP.NET 3.5\chapter07\statemanagement\web.config line 14) C:\Web\Beginning ASP.NET 3.5\Chapter07\StateManagement\CrossPage1.aspx 1 1 C:\Web\Beginning ASP.NET 3.5\

Error 2 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. C:\Web\Beginning ASP.NET 3.5\Chapter03\Web.config 46 

I downloaded the books source code and opened VS 2010 > Open Web Site > choose where the source code was located and tried to run the sample page and it wont let me


View Complete Post

More Related Resource Links

Editor's Note: It's Only the Beginning


MSDN Magazine Executive Editor introduces this issue

Joshua Trupin

MSDN Magazine September 2006

Why is ASP.NET appending "\" to the beginning and end of a cookie value?


Here's what I'm seeing in FireFox when viewing a Facebook generated cookie coming from facebook:

But when I go and get this cookie and shove it into an HttpCookie object, now it's appending this stupid "\" to the beginning and end causing me all sorts of issues..one with the first key/value pair and then the uid ends up containing a "\" after the uid value (WHY would it be appending this crap?!?!?):

my code:

string facebookCookieName = "fbs_" + ConfigUtil.GetAppConfigSetting("PayPalClientID");

            // Check for an existing session
            HttpCookie facebookAuthCookie = HttpContext.Current.Request.Cookies[facebookCookieName];

string userID = facebookAuthCookie["uid"];
            string accessToken = facebookAuthCookie["\"access_token"];

Error Message Implementing AdminCategories.aspx - book Beginning ASP.NET E-Commerce in C #



I'm following the book "Beginning ASP.NET E-Commerce in C #, and I can not move because I get an error.

I'm trying to work some days and I can not solve.

I'm on page 325, "Implementing AdminCategories.aspx" in GridView.

When I debug,
appears a error message.

Procedure or function 'CatalogGetCategoriesInDepartment' expects parameter '@ DepartmentID' Which was not supplied.

Detalhes da Exceção: System.Data.SqlClient.SqlException: Procedure or function 'CatalogGetCategoriesInDepartment' expects parameter '@DepartmentID', which was not supplied.

I've already made that part several times, I always get the same error.

I have this.

    //retrieve the list of categories in a department
    public static DataTable GetCategoriesInDepartment(string departmentId)
        //Get a configured DbCommand object
        DbCommand comm = GenericDataAccess.CreateCommand();
        //Set the stored procedure name

ListViewSubItem: Display End of Text Instead of Beginning?



in the case the ColumnHeader's width is too small, is it possible to not show the beginning of the SubItem's text (ending with "..."), but the end of the text, starting with "..."?


"The log was not truncated because records at the beginning of the log are pending replication." aft

I have restored a backup of a production database to a test server. The production database has transactional replication configured, but I don't need this on the test copy. Both servers are running SQL 2000 SP4.

To minimise the disk space the test copy uses I tried to shrink the log using:


This returns an error: "The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed."

After doing some web searches I tried executing sp_repldone a few different ways, but it just tells me that the database is not replicated. That's correct - it's not replicated and I don't want it to be. I just want to truncate the log! How can I do this?

Thanks in advance for any help!

Fast insert at end of list, fast remove at beginning of list (not queue)


Hi, I have realtime data, that is indexed, a list containing Objects implementing IDictionary.

Because of the amount of data incoming I would like to remove old from list, and add new data to list very very fast.

How do I best create a solution for this, I cannot use queue

Fast insert at end of list, fast remove at beginning of list (not queue)


thanks in advance, Patrik

Patrik Nylund

Problem with Removing Byte Order Mark in Beginning of XML generated by SQL


The problem:  --> When we Transmit our XML File to our trading partner they are complaining the first 3 bytes of the file contain ascii characters (239 (187) (191) ... and they are rejecting our File

These are non printable characters seemingly generated automatically by .net Framework.  Our process is the following:

1) We call a stored proceedure that generates sql via xml document object.  The insertion of the btye order seems to occur when converting the String to XML.  Does anyone know a way to prevent this "automatic" insertion of the byte order (non visble).

Private Function SaveXMLFile(ByVal sXML As String, ByVal sFile As String, ByVal sId As String) As Boolean
        Dim m_xmld As XmlDocument
        Dim bErr As Boolean = False

        'Create the XML Document
        m_xmld = New XmlDocument()


            Dim byteArray As Byte() = System.Text.Encoding.Unicode.GetBytes(sXML)
            Dim UTF8Bytes As Byte() = System.Text.Encoding.Convert(System.Text

sql job outputs garbage bytes at beginning of file



on one of my servers, any new sql job i create that outputs to a file has started putting 4 bytes at the head of each file.  the bytes are "ff fe 4a 00".    all existing jobs do not do this, only new jobs that are created.   this happens regardless of where i direct the output, or whether it's a tranact sql or CMDEXEC type job.  and it's only on this server.

any ideas, hints, etc.?

thanks much,


What's new in Entity Framework from beginning to EF 6

Microsoft Entity Framework (EF) is an Object Relational Mapping framework that provides an abstraction layer (a kind of mapping) between two incompatible systems (i.e. Object oriented programming languages with Relational databases). It enables us to interact with relational data in an object oriented way.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend