.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

Breaking a URL to site and file url

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :SharePoint
HI,    I have the url of  a file. Now I want to run the GetVersion webservice to get the versions of the file but this webservice takes the file url. So I need to break the full url into two parts SiteUrl + fileUrl. How can I do that using webservice. I know a method using FPRPC method "url to web url" call but that method is not working if the file url contains character of languages other than English.If someone has any idea about this issue as well than it would be a great help. Thanks and Regards

View Complete Post

More Related Resource Links

Build an Easy Maintenance Intranet Site: Using Office Docs, File System Object, and OLE Structured S


If you've ever needed to build an easy-to-maintain intranet site, here's a solution based on Microsoft Office documents. Many sites require constant updating of their HTML, but the use of Word documents can simplify the process. This article details the construction of a human resources site that exploits the File System Object (FSO), OLE Structured Storage, and ActiveX capabilities of Word documents. This allows the HR staff to copy their revised or newly created Word files to the site, dynamically generate a list of links to their files, and free IS from the constant recoding of HR updates into new HTML pages.

Josef Finsel

MSDN Magazine March 2000

Trying to launch a .exe file on my local computer from intranet site.


I have been told I can launch a local program on my PC from my intranet site but it has to be done with Active X or vbscript and not javascript.  I found the following little sample html code that will launch notepad.  However, I cannot figure out how to put this in a button, etc., within my aspx or code behind to execute it.  Does anybody have any idea how to do this?  I have a lot of javascript code I am launching urls with and I have even tried using that but again, I have been told that to do it client side it needs to be vbscript or something like this.  Any ideas?

  <title>Web page that runs EXE files</title>
  <h1>Web page that runs EXE files</h1>
  <p>Click <a href="file:///C:/windows/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows XP, ME, 98, 95)</p>
  <p>Click <a href="file:///C:/winnt/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows 2000, NT)</p>


Breaking news crawing horizontally web part in MOSS site



I would like to know which approach would be the best to show breaking news which will craws horizontally in MOSS site

Site File Structure, Folders, Learning project, subweb, web.config

I am just learning asp.net.  I purchased an "ASP.Net 3.5 web programming in C#" book, which I like allot.  I am on chapter 3 and want to complete a shopping cart exercise from the book.  I have to create several folders and files.  The exercise has the files and under the root directory and a few folders below that.  I already have a site that I've been learning on.  Can I create a subfolder on my site and put all the files in there?  Like the subfolder is the root of the project.   Here is list of Folders and files... Code/CartItem.cs Code/Product.cs Data/Cars.mdb Images/car.jpg Cart.aspx Order.aspx Web.config ................................ On my website I want to create a subfolder to keep alll the files in, as so... ShoppingCart/Code/CartItem.cs ShoppingCart/Code/Product.cs ShoppingCart/Data/Cars.mdb ShoppingCart/Images/car.jpg ShoppingCart/Cart.aspx ShoppingCart/Order.aspx ShoppingCart/Web.config ................................ Can I have two web.cong files?, one in the subfolder?  Or do I have to use the single, web.config file in the root directory of the site?  Are there any other pitfalls or trouble I might get into setting up my file structure like this?  Anything I should be aware of? Any thoughts or advice would be appreciated. Thanks, Mike   

File not found error when trying to open site permissions on a blog site

We have created a simple team site and a block subsite.  When trying to edit the site permissions we see the following error.  Any ideas? When opening a blog site and clicking Site Actions - site permissions we received a new page with the following error: Error File Not Found Troubleshoot issue with Microsoft Sharepoint Foundation Correlation ID: 51b54786-f344-4474-b88e-3080c363693 Date and Time: 3/24/2010 3:03:38 PM

Creating a new root Site Collection using a custom site definition file (ONET.XML)

Using Powershell, I am trying to deploy the our custom solution to SP 2010.  The script is doing the following: Deleting the web application using Remove-SPWebApplication Creating a new web application using New-SPWebApplication Adding and deploying a series of WSP files (one of which has the site definition file in it) using Add-SPSolution and Install-SPSolution Create a root site collection based on the site definition file provided in the WSPs using New-SPSite I get the error "WARNING: Template is not found and is not applied." When I run Get-SPWebTemplate, my site definition does not show up. I saw this: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/5ea46e07-a4b0-4bab-b698-9b6eeb695607 but I want a solution that does not involve me reloading a DLL, as, I feel there is something else I am forgetting. I have also tried: IISReset Resetting the timer service Cleaning the Cache (as described here: http://support.microsoft.com/kb/939308) Nothing seems to work.  Does anyone have any ideas?

i make a web site using frame but session is expire Error message is my Config file is attache

i make a web site using frame  but session is expire message is Object reference not set to an instance of an object Description: HTTP 500. Error processing request. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.LoadRecursive () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessLoad () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessPostData () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 My Web Config file is<configuration>    <!-- store the database connection info here -->     <appSettings>        <add key="sBook_StoreDBConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Program Files\CodeCharge\Examples\BookStore\BookStore_MSAccess.mdb;Persist Security Info=False" />            </appSettings>  <system.web>  <httpRuntime executionTimeout=&quo

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

Upgrade Solution using a .wsp file created from a site template

Hello, I'm creating a new site template that I will need to move from my development to production server. I have saved the template as a .wsp file and installed it on my staging server without any problems. However, I know once the site goes into production that changes will occur and I will need to upgrade the site template. I have tried to make changes to my development site and save a new site template, and then move to my staging server and upgrade the existing solution using the below PowerShell command, but I get an error that the GUIDS are different and the solution cannot be upgraded. Command: Update-SPUserSolution -Identity MyTemplate v1.wsp -Site http://webapplication/site  -ToSolution MyTemplate v2.wsp Error: Update-SPUserSolution : Given solution cannot be upgraded to the provided ToSolution because the solutions have different Guids. Does anyone know how I would upgrade the solution when using a site template as the bases for the solution? Thanks, wm5

Help file of SharePoint Site

Hi ALL, I want to create Help files for my SharePoint Application.Need guidance!!!

where is the .sln file for new Web Site got stored?

hi all, in vs2005, when i did File > New > Web Site > ASP.NET Web Site and choose a folder to save the project in. how come when i browse to this folder i can only see the App_Data and the Bin folders and the Default.aspx and Default.aspx.cs files. my question is, where does the .sln file got stored? i am not able to complile the Web Site again if i close the project because i couldn't find the .sln file.

File Not Found While creating a Site

Hi All , I created a site collection using a Explicit managed path and it is working fine , where as when i try to create a sub site under the same I am getting file not found exception , can anybody suggest as how to go about the issue . Regards Srujan.Nsrujan

Cannot open .XLSX file in Excel 2010 from WSS 3.0 site



I'm having trouble in opening .xlsx files created using excel 2007. File is on the sharepoint site (WSS 3.0). Since I have installled Office 2010 I am not being able to open this file directly from the browser. However, if I download it on my local PC its seems to open fine.

Excel 2010 shows error "Excel cannot open file "filename" because the file extension or file format is not correct. Verify the file is not corrupted..."

Please can someone suggest what I am missing on my sharepoint site?


Drag and drop to windows explorer of SharePoint site leads to 0KB file


I believe this issue got by so many people already.

We have a sharepoint site running on HTTPS protocol. There are some scenarios we get multiple documents from customers and need to move them to SharePoint to share them across organization. For this, what we are doing is, we are opening the library and from Actions menu -> Open in Windows Explorer.

The windows explorer is opening fine and when we tried to move the files from local system to windows explorer of the SharePoint site, it is failing to copy data and showing 0KB moved. And at the windows taskbar it is giving notification like "Got network delayed write fail message." when we are doing this on XP. On any other OS, there is no notification and not moving the file.

We are not able to understand the problem. Why it is not able to move, everytime it is copying 0KB.

We can do using upload multiple files feature, but we have to go back and forth between folders and it will slow down the process.

Please help me out, why it is happening... It is not network issue at all for sure.


ASP.NET and SharePoint developer
Company: http://www.rampgroup.com/
Blog: http://praveenbattula.blogspot.com

How to associate STP file to an existing site in same farm.




single farm


there are 2 web-applications: web-app1, web-app2.


Each webapp has one site collection. that is 


webapp1 has site-collect1


webapp2 has site-collect2


Now for some reason I want to copy site-collect2 to webapp1 as site-collect1.


content-db doesn't work because of database ID issue.


I am trying to use 'save as template' from site-collect2 and can get STP file but how do I assocaite this STP file to site-collect1. I am looking for any STSADM commands or source code that does this. Here also I wanted to create site-template with 'data' but it is giving me error. I will check this later. 

thanks for reading.please suggest.

Downloading a document from a sharepoint site to local file system, copy web service returns null

Hi Guys,
               I am trying to get this done for the last 2 days and I am still banging my head to the wall.
All I need to do is to download files from my sharepoint site library that uses integrated windows authentication. I was using copy webservice : getItem method to accomplish this.

CopyService.GetItem(copySource, out myFieldInfoArray, out myByteArray);

Problem : myByteArray is always returned as NULL

Note: I have tried the same with another site that uses forms authentication but the result was the same (NULL !!)

This is my code:


Copy copy = new CopyService.Copy();


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