in

Corey Roth and Friends Blogs

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

Kyle Kelin on .Net

  • Importing data from one list to another

    I needed to recreate a list on another website including the data. The list had over 150 items in it so no way was I going to recreate it manually. The first thing I did was recreate the columns for the destination list then export the original list to Excel. The option is under actions in the list view. But when I tried to import the spreadsheet into my new list I get the following error:

    Import of spreadsheet error: Method 'Post' of object 'IOWSPostData' failed

    I was like WTF. But a quick google search found the solution.

    Open the Excel Add-In EXPTOOWS.XLA locate in C:\Program Files\Microsoft Office\Office12\1033 by default. Press Alt+F11 to display the Visual Basic code editor and search (Ctrl+F) for the line lVer = Application.SharePointVersion(URL). Comment out that line with a single quote and add the line lVer=2 so your Intialize() method should now look like this:

    Sub Initialize(List, Title, URL, QuickLaunch)

    strQuickLaunch = QuickLaunch

    aTarget(iPublishURL) = URL

    aTarget(iPublishListName) = List

    aTarget(iPublishListDesc) = Title

    'lVer = Application.SharePointVersion(URL)

    lVer = 2

    End Sub

    I was a little nervous about doing this but it worked. Also when you try to save the macro it will warn you that it won't be signed if you save it. I went ahead and saved it. I haven't had any problems so far.

  • Testing to see if trackbacks on this blog work

  • Switching IIS to 64 bit

    I ran into this issue yesterday where I could install MOSS on a web server because asp.net was not set to allow in the web server extensions in IIS.
  • Sleepless tour continues

    My company Infusion is expanding the Sleepless In New York tour to five other cities.
  • Working with Enums

    A link to an article by Claudio Lassala on Enums.
  • Books I plan to read

    I thought this was a good of place as any to keep a list of books I plan to read in 2008.
  • Trying to set the StatusDescription property of the Response object

    During my latest project I had to create a HttpRequest manually to test a HttpHandler that I wrote. I wanted to go over some of the basics of the code and write about a strange error that I ran across. The HttpHandler is going to return a response code (200) if it is successful and some other number if the process fails. For example a 401 error if the user isn't authorized to view the request that was submitted. Nothing new or difficult there. The problem occurs because I want to set the StatusDescription property of the Response to the Exception message in the HttpHandler. The Exception message has some specific information about why the request failed. This way the client of the Handler can use the StatusDescription property to return a useful error message to the user.

      145   catch (ExtractRetrievalException e)

      146             {

      147                 // send the error in the reponse

      148                 response.StatusDescription = e.StatusDescription;

      149                 response.StatusCode = (int)e.StatusCode;

      150 

      151                 return;

      152             }

    In the client I create a httpRequest Object and call the GetResponse method. Then in the catch block I try and set the ErrorMessage text property to StatusDescription to display the message.

       75 HttpWebRequest httpRequest =

       76                 (HttpWebRequest)HttpWebRequest.Create(downloadUri);

       77 

       78             HttpWebResponse httpWebResponse = null;

       79 

       80             // download the file

       81             try

       82             {

       83                 httpWebResponse = httpRequest.GetResponse() as HttpWebResponse;

       84             }

       85 

       86             catch (WebException webException)

       87             {

       88                 httpWebResponse = webException.Response as HttpWebResponse;

       89 

       90                 ErrorMessage.Text = httpWebResponse.StatusCode;

       91             }

    The property gets set correctly in the Handler but when I access it in the client it is set to "Unauthorized" instead. The reason it is Unathorized is because the StatusCode being sent back in the Response object is 401 but why has it changed. The only reason I can think of is IIS is reseting that property. So far I have came up short on Google. Has anyone came across something like this?

  • MySpace development platform coming

    A couple of weeks ago I posted on the Facebook development platform. Well not to be outdone MySpace is now doing to release a developer platform. I couldn't find anything on myspace.com about this but several tech news sites have reported this rumor.

  • Tulsa Time - Speaking at Tulsa TechFest Friday 10/19

    I am flying back to Tulsa tonight to speak at Tulsa TechFest on Friday. I am doing a session over Dual Authorization in MOSS.

  • Developing a Facebook.NET application

    This past week I did a proof of concept for a Facebook application. I encourage everyone to try it. It is really fun but has some powerful uses.
  • Syncing Outlook and Google calendars

    Scott Hansleman and many others have talked about syncing Google and Outlook calendars. I gave it a shot and it was remarkable easy.
  • Creating connection strings made easy

    Matt Glace, a co-worker of mine showed me a cool trick for creating connection strings that I thought I would share.

     

    - Create a blank text file on your desktop. But instead of saving it with a txt extension save it with a udl extension. Name it whatever you want. UDL stands for Universal Data Link.

     

    - The icon should now show a little computer in it. Double-click on it to open it back up.

     

    - Go through the tabs and fill out the information like you would in VS or SMS. Test conneciton and then save.

     

    - Right click on the file but this time open with notepad. Your connection string is right there.

     

     

More Posts « Previous page
2019.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems