.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

Copying DB from old to new system.

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
I have set up a new computer and i need my database from the old computer to owkr on my new one so that i can continue working on my project.New computer SQL sever properties:PRODUCTMicrosoft SQL Server Express EditionOPERATING SYSTEMMicrosoft Windows NT 6.1 (7600)PLATFORMNT INTEL X86VERSION9.00.4053.00 Old Computer SQL Server properties:PRODUCTMicrosoft SQL Server Developer Edition OPERATING SYSTEMMicrosoft Windows NT 5.1 (2600)PLATFORMNT INTEL X86 VERSION10.0.1600.22I make a bak file ont the old system and try to make a new db in the new but i get this error message:"The media family on device 'E:\WEBB\FININ db bak\dbFinin.bak' is incorrectly formed. SQL Server cannot process this media family.RESTORE HEADERONLY is terminating abnormally. (.Net SqlClient Data Provider)"HELP! :(Thanks for your time guys! :)TITLE: Microsoft SQL Server Management Studio ------------------------------ An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ ADDITIONAL INFORMATION: The media family on device 'E:\WEBB\FININ db bak\dbFinin.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09

View Complete Post

More Related Resource Links

System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology

The Agile System Development Life Cycle (SDLC)

The goal of this article is to describe the agile system development life cycle (SDLC), putting it in context from what you may have heard about within the agile community and more importantly within the context of your overall IT efforts.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of typ

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

System.IO.Packaging is not visible


I am new to ASP.net, I installed VS2005 and IIS 5 on my PC and set up my first website using IIS (not the embedded webserver in VS).

For some reason I cannot find the Assembly: "System.IO.Packaging", please let me know if I am allowed to use it in that medium and how can I reference it?

Thanks in advance.

how i can install sql server in my system


which edition of sql server  are best for me  Developer edition or express editon for development purpose.

i try to install last time sql server in my system but not successful so what i do for get the sql server in my system.

The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must



This is frustrating, and I don't know how to solve it.

I have a strange problem. I am adding a LinqDatasource object, and set the context:

        protected void LinqDataSource_ContextCreating(object sender, LinqDataSourceContextEventArgs e)
            e.ObjectInstance = new KaruselaDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

Then I get this error:
The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


On web.config I already have this:
<add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

NOTE: The datacontext is in a different project (DLL proect) where I added a refernce to System.Data.Linq.

is there another way adding a refernce to a web project? or only though teh web.config?


System.Xml.Linq.XElement and XPathDocument


I have an XPathDocument that I want to save to a table using LINQ, but I get this error

cannot implicitly convert type 'System.Xml.XPath.XPathDocument' to 'System.Xml.Linq.XElement'

I create the XPathDocument from some (valid) xml contained in a resource file

XPathDocument xDoc = new XPathDocument(new StringReader(Resource1.TestXML));

when I try to assign it with LINQ, it flags up an error

NewDataItem.XML = xDoc  ----  error here

NewDataitem is a LINQ to SQL object created from the underlying table, 'NewDataItem.XML' is a column type of 'XML'

how do i (easily) convert xDoc so I can pass it into the LINQ object ?

I want Er Diagram for Fees System of small institution ,can u plz guide me what fields are necessary


I want Er Diagram for Fees System of small institution ,can u plz guide me what fields are necessary to store Fees information ...


System.DirectoryServices NOT available


I have simply copied a page from a VS2005 project to a VS2010 project, and it will not work.

NO code-behind, just a simple Page_Load function in the .aspx page.

and okay, since this editor complete f's up a cut and paste from VS, I will type it all out....wonderful!


<script runat="server">

protected void Page_Load(object sender, EvnetArgs e)


   System.DirectoryServices.DirectoryEntry ...



This is really all you need to see.

The System.DirectoryServices is not available in intellisense and gives an error if I try to run this.

I have added the reference to my VS project - no go.

I have added a reference as an @Import at the top of the page - no go.

All other System classes appear to be available, but not DirectoryServices, so anyone know the secret handshake to get this to work in VS 2010?

Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot open or save any mo


Hello good people, 

I have this beast as an error. Did my research and found some posts here as well but did not do any good for me. 

Here is what I did. I had an error regarding issue rights with COM objects so I gave access rights under component services for Microsoft Excel application now I am getting this error. 

Here is some information regarding this

1. Gave rights to ASPNET and network service to my web app directory to try to fix this error. 

2. The exact same process works on my Windows 2003 server and my Windows 7 development machine. I am trying to get this going on a different windows 2003 machine that is outside of our domain.

3. Developing on windows 7 64 bit with office 2010 installed. Also excel 2010 is installed on my Web server

4. Here is the code that is causing the error: The last line is causing the error.:

            MyXl = new Microsoft.Office.Interop.Excel.Application();
            MyXl.Visible = false;
            MyWb = (Microsoft.Office.Interop.Excel._Workbook)(MyXl.Workbooks.Add(Missing.Value));
            int test = 0; 
            MySheet = (Microsoft.Office.Interop.Excel._Worksheet)MyXl.ActiveSheet;
            if (reader.HasRows)
                int InRow = 2; 
                for (int i = 0; i < Nu



Hi there,


 I am doing one task on asp.net graphics. i would like to a form that let the user choose the color code from the color picker.

inside my backend code, i can get the color code and convert to the system.drawing.color.



Dim col As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml("#9932CC")

 Dim Brush As New SolidBrush(col)


but i have some problem in make this col object to alpha color. as i know the .net code that make the system color to become alpha is wrote as like tat :

gr.DrawString(strWatermarkText, wmFont, New SolidBrush(Color.FromArgb(8, 0, 0, 0)), x, y)


May someone share me how to make the color input from form to become alpha color? thanx in advanced. hope to hear from you all soon 


System.Drawing.Image.Fromfile is not working


I am trying to get the height and width of the image dynamically.  The reason is I am loading multiple images using code, where the image name is from the database. 

Here is my code:

in the ascx page, I have an asp image

<asp:image id="imgInfo" runat="server" /> 


In the code behind

string ImagePath = "~/products/img/" + dataviewImgInfo[0]["imgName"].ToString();

System.Drawing Image imgProd = System.Drawing.Image.FromFile(ImagePath);

if(imgProd.Height > 200)

imgInfo.Height = 100;




imgInfo.Height = 200



WHen I run this page I am getting the folloiwng error

Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T


when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Stack Trace is :-

Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204
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