-
Using authenticated RSS feed to Serve Public Data
Posted on November 13th, 2009 No commentsI can only a little bit about this project now since we haven’t completed it but it’s really neat.
Currently Departmental phone numbers are tracked on a Sharepoint list and then once a year, formatted and sent off to the printers for publication. Some people decided we should make this information publicly accessible in an online version. The problem is the Sharepoint data lies in an authenticated NTLM environment, how do we get it out there for the public?
We, being Brian and I, created a simple AutoIT script that fetches the RSS feed of the list and saves it as an XML file. We added a service account to the Sharepoint site as a reader so it can access the information. The AutoIT runs as this user on a scheduled basis on a web server. With the XML file saved, it is passed through a ColdFusion script that parses the XML data to get the information we need and writes it into a SQL database. When users update a number in the list, the RSS feed sends this information along, the script gets it, processes it and dumps it into the database.
It’s probably a round about method of doing it and I’m sure there’s a more elegant Object Model method for this. As a non-developer, I relied on Brian’s ColdFusion ability to handle the data conversion.
We had a student programmer code an interface and it’s going to be rolled into our publicly searchable data soon.
Plurk This Post
Buzz This Post
Delicious
Digg This Post Stumble This Post -
Page viewer web part and UNC paths
Posted on July 22nd, 2009 No commentsNo it isn’t what you think, I’m still at ECU and not a Tar Heel. This post comes about from an internal project that I had done and now we are reworking. A bit of history, we are trying out using Sharepoint to serve as a file server for various software packages.
Some concerns were raised about performance because these large files live in the content databases, which is valid I suppose. So I have been experimenting with trying to find ways to deliver the files from a different file server so the files stay outside the Sharepoint databases. Easy, I’ll use the page viewer web part and link to the file on the file server, problem solved. Or so I thought.
IE is the only browser that will allow UNC connections in a page viewer web part and serve up the file. Firefox, Chrome, and Safari (horray for multi-platform environment) show the file path but don’t serve it. Searching for ideas on how to deliver the files, I turned to Tony and Brian, two web gurus I work with.
Trial and error later with little success, Brian had an idea to use AutoIt to build an installer with the UNC path embedded. This is then uploaded into a Sharepoint document library and linked to. This worked as desired. After some tweaking, we developed a little application that was all variable based and allowed us to create exe files on the fly. That AutoIt code is as follows:
Dim $uncpath; $uncpath = InputBox("UNC Path", "Enter the UNC Path of the EXE"); If(@error = 1) Then Exit; EndIf Dim $fileToWrite; Dim $fileHandle; $fileToWrite = InputBox("File to Create", "Enter the name of the desired executable (w/o extension)", "c:\fileName"); If(@error = 1) Then Exit; EndIf $fileHandle = FileOpen($fileToWrite & ".au3", 2); If($fileHandle = -1) Then MsgBox(16, "File Error", "Cannot open file: " & $fileToWrite ); Exit; EndIf FileWriteLine($fileHandle, "If(FileExists(""" & $uncpath & """)) Then"); FileWriteLine($fileHandle, "MsgBox(64, 'Please Wait', 'Loading setup files. Please wait.', 20);"); FileWriteLine($fileHandle, " Run(""" & $uncpath & """);"); FileWriteLine($fileHandle, "Else"); FileWriteLine($fileHandle, " MsgBox(16, 'Sorry', 'You are either off-campus or do not have permission to access this program.')"); FileWriteLine($fileHandle, "EndIf"); FileClose($fileHandle); Run("C:\Program Files\AutoIt3\Aut2Exe\aut2exe.exe /in " & $fileToWrite & ".au3 /out " & $fileToWrite & ".exe /icon c:\jr.ico ");
The advantage of this is that small files (280k vs 700 mb) can be uploaded to Sharepoint which will then go out and grab the actual setup files for the application to install. While StoragePoint would be great to have to remedy this, it isn’t available due to fiscal responsibility to our budget.
Plurk This Post
Buzz This Post
Delicious
Digg This Post Stumble This Post


