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


Top 5 Contributors of the Month
david stephan
Post New Web Links

Attaching mdf files to ISP sqlserver2005

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
 
How can you use two mdf files (aspnetmembership and websitecontent databases), developed with visual studio 2008 on a standalone computer (i.e. sqlexpress), in a webapplication on a server of an ISP which has sqlserver2005 installed? (I already changed the mdf files to be 2005 compatable)The ISP delivers "mssql lite" as a database management tool. The connectionstring in the web.config file in the main folder of the webapplication is changed so that it points to the sqlserver of the ISP with the delivered loginname and password. The application seems to be able to connect to the sqlserver. But as soon as you try to login on the website as one of the members in the aspnetdb file, there is an error which crashes the application. After enabling error reporting in de web.config file the error stated was that the AttachDbFile in the web.config file was a wrong parameter. I want to keep the databases in the mdf files in the datadirectory of the webapplication, excactly as on the development computer. In mssqllite there is no way to point to these files, and also there is already one standard database which was added by the ISP, which i don't want to use. Someone gave me the answer that the ISP had to attach these files and give me the correct connectionstring. The ISP answered that they cannot connect files but i had to fist export these databases and a


View Complete Post


More Related Resource Links

Microsoft SQL server 2005 database LDF MDF files attaching issue

  

Dear all,

Last month our Windows 2003 server hardware raid was failed, all live databases available on this raid partition, now we have recover all databases which MDF and LDF files.

 Below is the error snap link. http://cid-51b01a6564f704c6.photos.live.com/self.aspx/Kamran/Error%20Snap.png

We are in the process of attaching the Recovered Database “nice_interactions ” using .MDF and .LDF files; it prompts the Following error [Please view the snapshot below for reference]. Kindly advise further how to restore or attach database using .MDF and .LDF files which is not cleanly shutdown.

Microsoft SQL forwarding to following URL in the Detail of below  listed Error while we are trying to attach the recovered .mdf file.

 

http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=824

Need help in this regards.

Kamran Khan

 

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

  
.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET AJAX
.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

SharePoint document migration challenges when migrating files and folders

  
There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Combine, minify and compress JavaScript files to load ASP.NET pages faster

  
Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.

PrintPocketCE Print Pocket Excel, Pocket Word and email files

  
Version 3.560 (May 15, 2009):
bullet

Important bug fix: a slight difference in how some devices create fonts was causing a few devices to have significantly longer print times for large print jobs.
bullet

Adjusted PocketJet printer paper feed commands
bullet

Other minor fixes and enhancements.

Version 3.559 (Mar 5, 2009):
bullet

Added support for Martel MCP78xx printers

Version 3.558 (Aug 20, 2008):
bullet

Added support for Martel MCP78xx printers

Version 3.557 (June 27, 2008):
bullet

Fixed error in Canon printer support
bullet

Fixed COM0 port selection

Version 3.556 (June 15, 2008):
bullet

Added support for Brother MW-260
bullet

Added support for Sato MB400

Version 3.555 (Aug 8, 2007):
bullet

Added support for Pentax RuggedJet 3 and RuggedJet 4 printers
bullet

Changed Epson TM-P60 support to maximum page width of 1200 dots

Version 3.551 (Aug 1, 2006):
bullet

Added Peripheral Nomad printer support

Version 3.550 (Mar 23, 2006):
bullet

Added Panasonic JT-H200PR printer support
bullet

Added Pocket Spectrum printer support
bullet

Fixed problem with WM5.0 "inverted image" problem

Conversion of text files from ANSI to UTF-8

  
reading and writing text files in ANSI format and
writing html-files in Charset ISO-8859-1 (Western Europe).

How to transfer files between computer and mobile device using bluetooth

  
What is Bluetooth? How can I have it on my computer?

Bluetooth wireless technology is a communication technology that allows two devices to communicate wirelessly. Most of the notebooks are nowadays equipped with bluetooth. For those notebooks or computers that don't, you can use a bluetooth dongle to add the functionality and it just costs you around $5. Although higher price range bluetooth dongles are available but it makes no sense of buying them if you just plan to connect your mobile device to the computer. Look for one that has Bluetooth v2.0 + EDR (Enhance Data Rate) supporting speeds of upto 3Mbps and with Vista support. You can easily have one of that kind in just $5.

Setting up bluetooth to work on your computer

Just Insert the bluetooth dongle in the USB.
It should get detected by your Operating System and should be ready to use. In case it is just detected as a new hardware, you need to install drivers for it that came with your bluetooth dongle (You can try Google to find the drivers).
Once drivers are installed, a bluetooth notification icon will appear in your system tray.
Right Click on it to access Settings (This may vary with your bluetooth dongle).
Make sure you have turned Discovery On (It allow others to see your computer).
Switch On the bluetooth on the mobile device.

dynamically adding sql server columns based on number of files in fileuploader

  

I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.

 

I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!

 

Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")

objConn.Open()

Printing resource files

  

Hello,

I have some resource files for localization and would like to print them. When I try to print them in Visual Studio (with File -> Print...) the button is disabled. Does anyone know how to print them? (Without copying each into word or excel)


Thanks and regards,
Chris 


Wrong Account being used to access files - Help - No Impersonation

  

I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.

 

I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).

 

Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.


Disallow Direct Access To Files

  

Afternoon,

Here is my dilema, on my site i have a WordPress Audio player (http://wpaudioplayer.com/standalone) that plays my mp3's.

It loads the Mp3's in by javascript...example below:

       AudioPlayer.embed("audioplayer_7", { soundFile: "/Files/Music/[name of file].mp3" });

This file name is clearly visible in the browser source. Not a problem, however this means that any user can legitimately browse to the file directly and download it.

Now i still need the mp3 player (which is flash) to have access to the file but if a user was to try accessing the file directly, they would not be allowed access to it.

I am not sure how to go about this, i am circling the idea of a httphandler but not sure if this is sufficiant to stop the direct access to the file.


Any help would be appreciated


connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.

  

I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?


reading values from config files in NUnit tests

  

One of my NUnit tests has to read in some values from config files.  In my main application this process works perfectly well, however when I run the unit test, the code that reads in the values from the config files doesnt read anything in.  Ive tried putting app.config in my unit test project (I even tried web.config) but nothing seems to work.  Are there any special steps involved when reading from config files in an nunit test ?


NUnit and config files

  

Ive created an NUnit test project in my solution and have added 3 tests.  They all fail with the same error


Systems.Code.Test.TransactionTest.CreateDataContext_ConnectionString_ReturnsDataContextObject:
SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.

Systems.Code.Test.TransactionTest.CreateDataContext_ConnectionString_ReturnsDataContextObject:

SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.

  ----> System.NullReferenceException : Object reference not set to an instance of an object.


heres the test method


[Test]
        public void CreateDataContext_ConnectionString_ReturnsDataCon

Translating RESX files

  

So I took the Forums advice and made a separate RESX file for each ASPX page in my web app. Personally, I wanted to put all of my language strings into a single global RESX file, but instead I did it the 'right' way and made a separate one for each ASPX. So now Ive got about 100 different RESX files with 5 to 15 short strings of text each. Many of them are repeats. The question is, how can I export these 100 RESX files into one single spreadsheet that I can send off for translation to other languages? Whats the normal way to do that? I dont want to send the translating company 100 little files, I'd rather send just one big one. And I'd like to omit duplicate text strings (for example, "Cancel" appears in at least 50 of the RESX files - I dont want to pay for that word to be translated 50 times).

Thanks


Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa

  

If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009


Advanced Basics: Office 2007 Files and LINQ

  

LINQ to XML and the Microsoft SDK for Open XML Formats simplify access to the parts of a 2007 Office system Open XML document when retrieving or modifying data, resulting in shorter, less complex code.

Ken Getz

MSDN Magazine March 2008


Categories: 
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