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


Post New Web Links

Replacing/Updating Files using WSP

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#
 

I'm trying to replace/overwrite the ItemStyle.xsl file using a WSP.  I can create a new file in the Style Library/XSL Style Sheets folder just fine using this method.  I just can't figure out how to update any file that already exists.  In the example below, the new file ItemStyle2.xsl gets created in the folder, but the ItemStyle.xsl doesn't get updated.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <Module Name="Style Library" Url="Style Library/XSL Style Sheets" Path="Style Library/XSL Style Sheets">
  <File Url="ItemStyle.xsl" Type="GhostableInLibrary" />
  <File Url="ItemStyle2.xsl" Type="GhostableInLibrary" />
 </Module>
</Elements>

Any Help would be greatly appreciated.  Thanks!


Nick Hurst


View Complete Post


More Related Resource Links

Updating Config Files in Sharepoint Farm

  
I am trying to update config files web.comnfig in the Virtual Directory of my server so that users are allowed to upload more that 50 MB of files in my IIS 7 server. Everytime i do the update it works fine but after few days when there are few changes then it removes the added elements itself and restore in the Original Stage. I used to edit my config files manually. I found a way of creating a config files and saving it to the Config Directory under 12 Hive in Server. Like the Content will be similar as follows <actions>    <add path="configuration/SharePoint/SafeControls">       <SafeControl          Assembly="System.Web, Version=1.0.5000.0, Culture=neutral,             PublicKeyToken=b03f5f7f11d50a3a"          Namespace="System.Web.UI.WebControls"          TypeName="*"          Safe="True"/>    </add>   </actions> I have to add following line <system.webServer>     <security>       <requestFiltering>         <requestLimits maxAllowedCon

Issue with designer files not updating -- and therefore cannot code

  

Hello,


I have a problem in which some nested controls on a page are not updated in the designer file. I have deleted the designer file, selected Convert to Web Application, but still the controls are missing.

I know there is a supposed fix at http://blogs.msdn.com/b/webdevtools/archive/2010/03/05/hotfix-for-issue-with-auto-generated-designer-files-not-adding-controls.aspx

Unfortunately the patch won't install and I still have the issue.

Any thoughts? I am running VS 2010 Version 10.0.30319.1 RTMRel.


thanks,

mitch


SQL XML Replacing(Updating) with condition

  

Hi,

I need a doubt in sql server xml


Sample XML

<City>

<Name =”Chennai” Rank=”5” />

<Name=”Pune”  Rank=”4” />

<Name=”Bangalore” Rank=2” />

</City>

 

I extract this xml through for xml in sqlse

What .net files must be kept after updating?

  

Amateur with a small hard drive problem. The .net Framework updates are killing me.  Is it necessary to keep 2.0 and 3.0 service pack 2's installed after you have installed 3.5 or Framework 4?  I really need the space.  Same thing with Java, after update 22, is it necessary to keep previous updates installed; or can all of these large updated programs be uninstalled?  thanks loads.

 

Groggo


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()

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.

  

i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.


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 


Error when updating. Supposedly updating ID without being asked.

  

 

Server Error in '/' Application.

Value of member 'ID' of an object of type 'Ref' changed.
A member defining the identity of the object cannot be changed.
Consider adding a new object with new identity and deleting the existing one instead.

I get this error whenever I attempt to update an entry. Even an entry that has had nothing altered. I have tried to circumvent it but I think it must be a simple oversight. How could I have caused an ID update using the Edit.aspx page of dynamic data? Thank you in advance for the help!


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?


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