Navigation


RSS: Matt Pavey RSS Feed



Thursday, July 30, 2009 @ 9:18 am,AJAX,Matt Pavey

<script type="text/javascript">
   function pageLoad() {
      
var manager = Sys.WebForms.PageRequestManager.getInstance();
      manager.add_endRequest(endRequest);
   }
 
   function endRequest(sender, args) {
      window.scrollTo(0, 0);
   }
</script>
 


Thursday, January 22, 2009 @ 9:17 am,ASP.Net,Matt Pavey

Another great article on ScottGu's Blog.

Microsoft recently released a cool new ASP.NET server control - <asp:chart /> - that can be used for free with ASP.NET 3.5 to enable rich browser-based charting scenarios:

Check out the article for more information on dowloading the free chart control, samples and documentation:

http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

"<asp:chart /> supports a rich assortment of chart options - including pie, area, range, point, circular, accumulation, data distribution, ajax interactive, doughnut, and more.  You can statically declare chart data within the control declaration, or alternatively use data-binding to populate it dynamically.  At runtime the server control generates an image (for example a .PNG file) that is referenced from the client HTML of the page using a <img/> element output by the <asp:chart/> control.  The server control supports the ability to cache the chart image, as well as save it on disk for persistent scenarios.  It does not require any other server software to be installed, and will work with any standard ASP.NET page."


Monday, January 12, 2009 @ 8:54 pm,WCF,Matt Pavey

"These hosting options range from running inside a console application to server environments such as a Windows service running within a worker process managed by Internet Information Services (IIS) or by Windows Process Activation Service (WAS). Developers choose the hosting environment that satisfies the service's deployment requirements. These requirements might derive from the platform on which the application is deployed, the transport on which it must send and receive messages, or on the type of process recycling and other process management required to ensure adequate availability, or on some other management or reliability requirements."
 
 
The article above provides some great information on how to use the different hosting services and explains in detail the key benefits and limitations to each.
 
For more specific information about each hosting service check out the following links also referenced in the above article:
 
 
These links were very helpful in understanding the different hosting options available for WCF services and more importantly understanding the right hosting environment to use based on  "... the version of Windows on which it is deployed, the transports it requires to send messages and the type of process and application domain recycling it requires."


Monday, January 12, 2009 @ 8:34 pm,WCF,Matt Pavey

If you are just getting started with Windows Communication Foundation (WCF) here's a great resource with videos that really help get you moving in the right direction.
 
The videos will make more sense if watched in the following order:
 
 
The videos demonstrate the following:
 
- Creating a WCF service
- Configuring a WCF service with various endpoints
- How to host a WCF service in IIS
- How to self-host a WCF service in your own applications
 
For additional information on WCF, check out the WCF Dev Center on MSDN and the .NET Endpoint team blog.


Sunday, December 28, 2008 @ 10:16 pm,SQL Server,Matt Pavey

Here is the error I received:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The server principal "UserName" is not able to access the database "DatabaseName" under the current security context. (Microsoft SQL Server, Error: 916)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3239&EvtSrc=MSSQLServer&
EvtID=916&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
 
After doing some digging I found the answer on Aaron Bertrand's SQL blog.
 
 
"For those of you who connect to database servers where you are not in full control over all databases, or where some of your databases are ever offline (or auto-closed), the new version of Management Studio that is shipping with SQL Server 2008 is going to bring you some surprises, when you try to present a list of databases in Object Explorer."
 
"It seems that the ability to do so is hinged upon the columns that are set up in Object Explorer Details by default.  In the case I came across yesterday, the offender was "Collation."  The problem is that for a database that is offline or has been auto-closed, collation comes back as NULL.  Well, that's not really the problem... the real problem is that SSMS throws its hands in the air when it comes across NULL for these values, and assumes this is NULL because you don't have permission."
 
"And then refuses to show the data for ANY database, instead of just hiding the one(s) that caused the error.  And this is true whether or not you have Object Explorer Details even open (my guess here is that the contents of OED are cached behind the scenes, even when it is disabled... which I speculate may be part of the reason behind the sluggishness that many have complained about).  You can read more about this in Connect #354322 and in Connect #354291."
 
"For those of you that connect to databases that are hosted by 3rd party providers, some of which are accustomed to leaving as many databases in auto-close mode as possible, you are first going to have to go to Object Explorer Details, right-click the column header list, and un-check Collation.  At this point, if you refresh the Databases node in Object Explorer, you should again see all of the databases on the server, even those where you don't have access.  Strangely enough, OED still shows you some other data by default, that it probably shouldn't (e.g. recovery model, last backup, owner)."


The opinions expressed on this website are my personal opinions
and do not represent my employer's or my clients' views in any way.