Sticking It In

Posted on 2007/04/27 by Randall.
Categories: Uncategorized.

I’m putting by partially-trusted webpart into this bitchy server. It took me a while to figure out how to get this to work…sharepoint is sort of a crazy bitch, and it sets up about three different websites under IIS when you install it. The sites it sets up are on strange ports, I went with the one on port 80.

I dropped the DLL into the bin folder and added my SafeControl line of XML to web.config. This didn’t work. I restarted the server and the new webpart showded up in the list under the _layout/newdwp.aspx page but when I hit submit on that form and then clicked on my new webpart to preview it, I received a warning about a missing AllowPartiallyTrustedCallersAttribute attribute. So I had to give the assembly a strong name (w/e that is) and then find the public key token for the compiled DLL. Again, I don’t know wtf that is either but it’s easy to find using Reflector. I popped this token into the web.config file and uploaded the new DLL. This worked like a fucking charm and I’ve done my first webpart. Pretty cool.

Wtf IS The Internet???

Posted on by Randall.
Categories: Uncategorized.

Now…I’m not REALLY familiar with entire span of legacy protocols, gopher for instance, but what I say is the case for 99% of what’s online at the moment. Also, I am not sure this is truly succinct but you can decide that…

The real answer to your question can be found in the following W3C document: http://www.w3.org/TR/webarch/

The summary of this article is that the world-wide-web is an information system comprised of many many unique names (URIs) and the things at the end of each URI. Often its text in the form of HTML. Well, as the internet IS for porn sometimes it’s bytes at the end in the form of JPGs and PNGs and GIFs. Sometimes it’s bytes of Flash, or PDF-bytes. Sometimes it is software, which could take the form of an executable (.exe), a VOIP conversation, or an HTML-based web application. Sometimes you can’t see what’s on the other side. It varies widely, but there is always an URL.

This system of names sits atop a network of hardware that simliarly is made up of many unique names (IP addressed). This is the “bunch of telephones” part of it. This is something I personally know less about, but I will say this…the glue that binds these URLs to the hardware with its IP addresses is the domain-name system.

This is one of those questions where the answer is like an onion…it is many layered and you can keep peeling and peeling and peeling layers away. Some are thin, some are thick. I think that the two layers I’ve outlined…the URI system and the computers with their phone lines are the real important layers.

I’m Lovin It

Posted on 2007/04/26 by Randall.
Categories: Uncategorized.

I have the power. I got my login for the dev server and I’m in the Sharepoint Server 2007 Central Admin tool. It’s pretty awesome. Now to figure out how I give my user account some permissions on the site. Before that, I guess I gotta figure out if there even is a site. How nuts would it be if installing sharepoint didn’t at least create one site during the process? Seems highly unlikely.

This Decompiler is Awesome

Posted on 2007/04/25 by Randall.
Categories: Uncategorized.

.NET Reflector is pretty sweet. It will basically open up any DLL and show you the guts. I like getting into the guts. Everyone knows this. Still, I find the whole idea cracked.

It seems to show me the complete implementation of functions!!! Nearly unbelievable, somewhat of a relief to see it spit out that code though.

Especially since the DLLs I found looked obfuscated. There were about 30 of them, and they all had funny names. I don’t get it, but shit everything looks like it’s about right so I won’t complain. Yet.

This is All Quite Hideous

Posted on by Randall.
Categories: Uncategorized.

I’m decompiling and searching through DLLs like they’re text files trying to reverse-engineer this e-commerce stuff and I can’t find any of the stored procedure names which I thought I would find. Now I gotta wonder if the ecomm stuff is buried in some other layer, or if it’s completed or not. This really really sucks.

My How the Times Have Changed

Posted on 2007/04/24 by Randall.
Categories: Uncategorized.

Just a little background…I started programming for the web in the year 2000. It was classic ASP backed by Access databases. I kept up with and knew it at a very detailed level. It seemed so easy then.

Now eight years later here I am feeling like a dummy. I’ve been doing projects with extra enterprisey techmologies. If there’s one thing that I cannot stand it is making a simple thing complicated. The other thing I can’t stand is Java. But above all others, I fucking loathe Oracle DB.

Anyway, I am really digging aspnet 2.0 and all the new tools MS has given us. I think SQLExpress is nifty, but tell me how the hell do you import csv data into your tables? This used to be so easy in SQL Server but now….now I don’t know wtf.

UPDATE: Use bcp, both for the original export of the data and when importing it into SQLExpress. Yeah, there’s no built-in Import functionality within SQLExpress. Tarded.

The Saga Continues…

Posted on by Randall.
Categories: Uncategorized.

Yeah anyway…it’s not that exciting.

What web.config file do you edit to include the webpart in the set of s? From what I’ve found the path will look something like this:

C:\Inetpub\wwwroot\wss\VirtualDirectories\850832ce-d9d4-4a58-b4c9-b06e40870062\_app_bin

But in my case it won’t have the wss directory, we’re on sharepoint server, not sharepoint services. I’ve read that it’s easiest to go in through the IIS Admin console and find the root directory of your sharepoint installation.

Decompiling May Be a Bitch

Posted on 2007/04/23 by Randall.
Categories: Uncategorized.

We will see….basically I’ve got to reproduce an existing e-commerce system and I do not have the source code. I have the stored procedures (and tables) from the database…I’ve got the APIs from Paypal/Payflow, but I do not know the correct way to call the stored procedures and I don’t know how the existing code call the stored procs and the order-of-operations for making calls into the Paypal APIs. I’ve downloaded Reflector but have yet to crack it open.

Installing WebParts

Posted on by Randall.
Categories: Uncategorized.

It seems straightforward. Create the assembly which will contain the compiled version of the webpart. Install this in the bin folder under the sharepoint installation. Add a safecontrol section to the web.config which describes the new (trusted) webpart. Craft a .webpart or a .dwp file which describes the webpart and upload this through the sharepoint UI.

Here goes nothing…

It looks like I don’t have access to the server through Remote Desktop, so I’m in a holding pattern I guess. I did find this magical URL for creating the .webpart file. You go to this URL http://sitename/_layouts/newdwp.aspx and it should pull up a list of all available webparts.

Guess I’m onto some more research-type duties for the rest of the day, until I hear back from the sysadmin at the hosting company. Time to look into Payflow APIs I guess….

Still an Amateur…

Posted on by Randall.
Categories: Uncategorized.

Working in a very, very professional place. If anyone cared to read this, I might be in big trouble right now. The project is not going to finish itself and they’ve got someone working on it (me) who doesn’t know jack-shit about the platforms (moss2007 and aspnet 2.0). What can I do? Here are links to these two books I’m lasing in order to catch up.

Essential ASP.NET 2.0

I’ve fiddled around with MOSS enough now to kind of know what I am doing. I should really re-read the earlier posts and see what kind of mistakes are in there but nahhhh….we’s just gettin started here anyway.

Microsoft Office SharePoint Server 2007 Administrator’s Companion

The next thing I’ve got to work on is some e-commerce hooks for our sharepoint website. I am assuming that building a WebPart is the way to go with this so I’ve been reading up and am about to do a Hello World and see if somehow I can finagle it onto the server. If not I’ll just send it to the guy tomorrow to see if he’d install it.

It seems like .skin files are the way to go. I had previously done some mucking around in Sharepoint Designer and I’ve dirtied the files perhaps. I did some editing of css in there and probably what needs to happen is to get a new theme going. I might have taken a step in this direction already but who knows when you’re as drunk as me.