First Post of December & New Category

Since I haven’t had time to setup a blog related to my .NET findings, I will utilize this site in the meantime to post this stuff. In any case, the past two days has been spent trying to figure out the following problem:

Server Error in ‘/cfs’ Application.
Only one WebServiceBinding attribute may be specified on type ‘WebService’. Parameter name: type
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Only one WebServiceBinding attribute may be specified on type ‘(information omitted)’. Parameter name: type
Source Error:
Line 36: Public Sub New()
Line 37: MyBase.New
Line 38: Me.Url = “(information omitted)”
Line 39: End Sub

Basically what happens when referencing a web service in .NET, it generates a proxy class on the fly to expose the wsdl as a useable class preventing developers from deciphering xml. This is all fine and dandy HOWEVER some may find issues when trying to utilize impersonation with the ASP.NET worker process as a different account (a.k.a. “<identity impersonate=”true” />). The user account may not have the proper ACLs in place to actually read and write to the generated proxy class and should follow the guidelines in this article here. Most likely, you need to give the user full rights to the “%windowsroot%\temp” directory.

Again, in most cases, the solution above should resolve most issues. HOWEVER (a 2nd time), if you are utilizing an assembly with a web service that has a strong name assembly, you will most likely run into some errors. Specifically, if you specify an snk in the assembly info file and you have multiple copies of that assembly running around, you may run into a problem where it complains of the following:
System.IO.FileNotFoundException: File or assembly name wavxczxa.dll, or one of its dependencies, was not found. File name: “wavxczxa.dll”

In this case, be sure to remove the line where you reference the snk in the assemblyinfo file.

Sheesh, I’m sure a nerd.

Comments off

RowState vs. RowStateVersion

Yes, apparently there is a difference between the two, one applying to the overall state of a DataRow, the other to a DataRowView. (Thank MS for confusing me even more) The RowState of a DataRow is the resultant of a Fill or Update method call against a DataSet or DataTable. RowStates include: Detached, Added, Modified, Unchanged, and Deleted. The RowStateVersion probably maintains running versions per the state that the DataRow is at allowing for rollback of changes and such. I guess it’s a good idea, just wish it would better explained. The important thing to keep in mind is that the state of the DataRow will remain the same until AcceptChanges is called (which is called implicitly after DBDataAdapter.Update).

Comments

SBS Execution + Win2K3 Server

Yes, like all things good from M$, deploying ASP.NET applications has proved to be at times frustrating. I really appreciate all the inadequate documentation or rather the lack of such documentation in helping developers deal with running .NET applications in 1.0 and now 1.1.

Couple of things:

  1. Side-By-Side Execution. The ability to run both .NET 1.0 and 1.1. This has proved to be a major pain. Especially when it occurs to me that if I wrote the application originally in .NET 1.0, I must remember to run “aspnet_regiis” against the correct framework.
  2. Runtime fun between VS.NET 2002 and 2003. Oh yes. VS.NET 2002 is paired to only compile and run with .NET 1.0 while 2003 with 1.1. What does this mean? I can’t simply install .NET 1.1 and then compile my apps in VS.NET 2002 and expect them to work.
  3. When all is said and done, I move my now-legacy ASP.NET over to Win 2K3 and run aspnet_regiis, only to get a 404 error claiming it cannot find my web app all of the sudden. Dammit! It turns out you must “allow” access to “All Unknown ISAPI Filters” under the Web Services Extension node in IIS 6.

So thank you M$! While making development somewhat a breeze and visually pleasing in your well-made IDEs, deployment is a whole other beast that we are left to tame. You would think that if M$ is learning on Java’s dime, they would have figured these issues out.

Comments

FYI…MS .NET Migration = BS

With the advent of .NET framework 1.1, MS is attempting to get everyone to overhaul but of course they try to add the one caveat of backwards compatibility…supposedly. “Side-By-Side Execution” is the idea of having developers able to keep legacy code written with .NET 1.0 while moving towards the newer runtime environment. And to be fair, MS has listed out some compatibility issues and for the most part, major things in some of the namespaces like ASP.NET should work fine (just remember to run “aspnet_regiis”).

But of course, with anything I develop, shit has to break. Writing code for distributed transactions, specifically for the System.EnterpriseServices namespace, breaks once you try to add .NET 1.1 and VS.NET 2003. So big fat thanks to MS for a nice IDE and for a crappy runtime environment.

Think it’s time for my fix of Java.

Comments

Retaining Scroll Position After Postback, Revised

While Sriram at DotNetJunkies published Retaining Scroll Position after PostBack that gave an idea of how positions should be retained with anchors, the code didn’t work when I tried. Apparently what he/she had failed to mentioned or to include within the code is the fact that all server controls will be renamed with a “_ctl” prefix along with the server control name, following the rules of the INamingContainer interface. So, after some retooling, this is the code I came up with:

_EndingScript += “<script runat=”"server”">” & vbCrLf
_EndingScript += “someString = String(”"” & Request.Form(”__EVENTTARGET”) & “”");” & vbCrLf
_EndingScript += “locate = someString.indexOf(’:');” & vbCrLf
_EndingScript += “part = String(someString.substring(locate + 1, someString.length));” & vbCrLf
_EndingScript += “location.href=”"#”" + part;” & vbCrLf
_EndingScript += “</script>”

If Not IsStartupScriptRegistered(”PostbackAnchor”) Then
RegisterStartupScript(”PostbackAnchor”, _EndingScript)
End If

So, follow Sriram’s intruction up to the point of placing anchors near the postback control and naming the anchor the same as the control itself, but use the script from above to get it to work. (NOTE: I’ve only tested this on ASP.NET 1.0. Not quite sure how it will play out with 1.1)

Comments (1)

Gmail: Great for “dump, pile, and search”

I’ve been using Gmail for the past 6+ months. It’s been my main email repository where I filter my SIMS email along with a whole slew of other email. You also can’t beat the fact that the search utility is great.

BUT, if there is one thing, and only thing I could wish for, that would be an “Unread Messages” tab/folder. Truth of the matter is that I don’t look email all at once. That’s right, I’m selective. An email from the “.sims.berkeley” domain is more likely to get my attention along with friends and family members. But for all those other emails like potential jobs and cool things to check out requires time, more specifically, leisurely time.

So, there you have it. I have an inbox tab that is ALWAYS highlighted in bold with the number of messages unread in the parentheses, taunting me as if I were an unattentive parent who cared more about learning exact Biblical passages instead of taking a true interest in my kid’s life…

Comments

Ubuntu Linux: How to install Java

This is a modification of what is posted on the Ubuntu wikipage on Java. Enjoy!

1. Go to Applications > System Tools > Root Terminal
2. Edit sources.list
pico /etc/apt/sources.list
3. Add the following lines:
deb http://ubuntu.tower-net.de/ubuntu/ warty java
deb http://archive.ubuntu.com/ubuntu/ warty multiverse
4. apt-get update
5. apt-get install sun-j2re1.5

Comments

Ubuntu Linux: Totem

So it looks like installing the fglrx driver for an ATI card renders Totem impotent. The solution: System > Administration > Synaptic. Mark the totem-xine for install and all should be good.

Comments

Windows XP: Fix MBR

If you ever have a need to fix your master boot record, look at this link. Thanks to Arthur for the link…

Comments

SIMSter in the news: Mr Savage and the WiFi Cafes

Comments

« Previous entries ·