Thursday, November 24, 2011
Microsoft announced a lot of great new information about ASP.NET 4.5, ASP.NET MVC 4, and Visual Web Developer 11. Here's an overview of what's available, how to get it, and some of the top features.
Note: These are all developer previews. That means they're not officially released, supported, shipping products; they're previews to let you get an early look. Read the release notes and play safe!
ASP.NET 4.5 Developer Preview
ASP.NET 4.5 is part of the newly announced .NET 4.5 Developer Preview. It's available for MSDN subscribers today (9/14) with general availability on 9/16. This release includes a lot of great core features in the ASP.NET runtime as well as ASP.NET Web Pages enhancements.
Top Links for the ASP.NET 4.5 Developer Preview:
Jon Galloway lists features and top links for the Developer Previews of ASP.NET 4.5, ASP.NET MVC 4, ASP.NET Web Pages 2, and Visual Studio 11.
Saturday, October 08, 2011
Our web site links are listed as a convenience for our visitors. We carefully review every site. Our directory goal is to present valuable resources. If you use these links, we take no responsibility and give no guarantees, warranties or representations, implied or otherwise, for the content or accuracy of these third-party sites.
Tuesday, September 27, 2011
I have just installed SmarterMail v8.2 and it sends perfectly my e-mails to GMail and HotMail.
When I send an e-mail from one user to other user in the same domains managed by SmarterMail it also works.
But I am not receiveing any e-mail from other domains, and also do not receive any error message when I send this e-mails from GMail or HotMail.
TELNET is working perfectly on port 25.
I have also written a small ASP.NET application and sent e-mail using SmartMail SMTP.
It works fine, sending e-mails to SmartMail, GMail and HotMail.
Just external domains are unable to send e-mail to SmarterMail.
ERROR Message: [failure notice]
This is the mail delivery agent at messagelabs.com.
I was not able to deliver your message to the following addresses.
<support@prepareuktest.co.uk>:
173.248.128.224 does not like recipient.
Remote host said: 550 5.7.1 Unable to relay for support@prepareuktest.co.uk
--- Below this line is a copy of the message.
Return-Path: <support@mydomain.co.uk>
X-Env-Sender: support@mydomain.co.uk
X-Msg-Ref: server-14.tower-188.messagelabs.com!1317116426!52052066!1
X-Originating-IP: [193.82.120.253]
X-StarScan-Version: 6.3.6; banners=mydomain.co.uk,-,-
X-VirusChecked: Checked
Received: (qmail 32611 invoked from network); 27 Sep 2011 09:40:26 -0000
Received: from unknown (HELO mail.mydomain.co.uk) (193.82.120.253)
by server-14.tower-188.messagelabs.com with SMTP; 27 Sep 2011 09:40:26 -0000
From: "Sajeel Munir" <support@mydomain.co.uk>
To: <support@prepareuktest.co.uk>
Subject: test
Date: Tue, 27 Sep 2011 10:40:21 +0100
Organization: Home
Message-ID: <106EEF9FCBA446399B9056484644025E@arnoldPC>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0006_01CC7D01.DCC35590"
X-Mailer: Microsoft Office Outlook 11
Thread-Index: Acx8+Xk8iZP2lIQ7SGOiFQcpxB8sHw==
X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01CC7D01.DCC35590
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
SOLUTION:
Binding Alternate Ports In Smartermail x8.2
While the ability to add alternate ports is not new to Smartermail 8, the process to add them as well as now being able to define more than 2 alternate ports is. Smartermail 8 introduces the ability to now define multiple ports as well as the ability to assign SSL's directly to them.
1- http://www.hosting.com/support/smartermail-8/binding-ports-in-smartermail-8
2- http://www.activeservers.com/SSL/TLS-SmarterMail-8.aspx
Wednesday, June 08, 2011
I've set up a project with an .SDF local database file and am trying to access it using an LINQ To SQL (".dbml") file. I have used the connection string provided by the .sdf file and can instantiate the object with out a problem:
I am getting the following errors:
"The table name is not valid. [ Token line number (if known) = 2,Token line offset (if known) = 14,Table name = Person ]"
(I am using Visual Studio 2010 SP1 .Net 3.5 and SQL Server Compact 3.5 sp2)
SOLUTION:
Get rid of the "dbo" in the Table attributes on the objects created by Linq to Sql (FileName.designer.cs)
Example:
[global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.TableName")]
Change to:
[global::System.Data.Linq.Mapping.TableAttribute(Name = "TableName")]
http://support.microsoft.com/kb/951932/en-us
Friday, November 19, 2010
Introduction
One of the new features being added to version 4.0 of ASP.NET is the ability to control the client side IDs that are generated by the framework. Previously the framework would modify the client side IDs to uniquely identify each control. This some times left you with the ID you defined in markup or sometimes left you with something that looks like this, "ctl00_MasterPageBody_ctl01_Textbox1."
The Problem
Here are some of the errors that you could experience when the ClientIDMode is set to Static:
All RadControls: Invalid JSON primitive:..
RadEditor's dialogs : Error: 'null' is null or not an object
RadEditor's dialogs : Sys.ArgumentNullException: Dialog Parameters for the FindAndReplace dialog do not exist
Parameter name: dialogueName.
RadFileExplorer: might not display the files in the folder
RadGrid : calling get_masterTableView() returns null
"Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object"
ASP.NET 4.0 Solution
First off let me start by explaining why we decided to tackle this problem in version 4.0 of the framework. While we provided a way of supplying the developer with the client side ID, with the growth of client side scripting this solution has become some what hacky. There is not really a clean way to use this with lots of controls and lots of external script files. Also it might have had something to do with the developer asking for control over this. Developers do love to have control of everything, weather they use it or not, it’s just our nature :) The solution that we came up has four ‘modes’ that a user can use giving them everything from existing behavior to full control. The controls ID property is modified according to the ClientIDMode mode and then used as the client side id.
The ClientIDMode property can be set on individual controls, on the page or at the application level
· Individual Controls
<asp:Panel ID="PanelChild" runat="server" ClientIDMode="AutoID">
· Page level
<%@ Page Title="Sample" Language="C#"
MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default"
ClientIDMode="AutoID" %>
· Web.config file
<system.web>
<pages clientIDMode="AutoID"></pages>
</system.web>
Note: The default ClientIDMode value at the page level is 'AutoID' and at the Control level is 'Inherit'
Related Information:
http://weblogs.asp.net/scottgu/
http://www.codeproject.com/
http://www.telerik.com/community/forums/
http://www.dotnetcurry.com/
Thursday, August 19, 2010
Today, I am having a very annoying problem; my situation is that when I select a new value on the ddl, the page posts back, the Page_Load function is invoked as PostBack, but the Event handler is never called. I have checked the handler logic in InitializeComponent; it is fine.
<asp:DropDownList ID="Dropdownlist1" CssClass="dropDown" runat="server" Width="200px" OnSelectedIndexChanged="Dropdownlist1_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="Item 1">Item 1</asp:ListItem>
<asp:ListItem Value="Item 2">Item 2</asp:ListItem>
<asp:ListItem Value="Item 3">Item 3</asp:ListItem>
</asp:DropDownList>
private void Dropdownlist1_SelectedIndexChanged(object sender, EventArgs e)
{
//
}
dropdownlist already set AutoPostBack="true", but still will not fire SelectedIndexChanged event.
SOLUTION:
hours of testing and i was finally able to figure this out. I had EnableViewState turned off with my .aspx page header.
when the ViewState is not saved it reverts back to the First Item as the Selected Index. Selecting the First Item then does not trigger a SelectedIndexChange Event. make sure EnableViewState is true both on the control and on the page.
Wednesday, July 07, 2010
SQL CE is a free, embedded, database engine that enables easy database storage. We will be releasing the first public beta of SQL CE Version 4 very shortly. Version 4 has been designed and tested to work within ASP.NET Web applications.
Works with Existing Data APIs
SQL CE works with existing .NET-based data APIs, and supports a SQL Server compatible query syntax. This means you can use existing data APIs like ADO.NET, as well as use higher-level ORMs like Entity Framework and NHibernate with SQL CE. Pretty much any existing data API that supports the ADO.NET provider model will work with it. This enables you to use the same data programming skills and data APIs you know today.
No Database Installation Required
SQL CE does not require you to run a setup or install a database server in order to use it. You can now simply copy the SQL CE binaries into the \bin directory of your ASP.NET application, and then your web application can run and use it as a database engine. No setup or extra security permissions are required for it to run. You do not need to have an administrator account on the machine. It just works. Applications you build can redistribute SQL CE as part of them. Just copy your web application onto any server and it will work.
Database Files are Stored on Disk
SQL CE stores databases as files on disk (within files with a .sdf file extension). You can store SQL CE database files within the \App_Data folder of your ASP.NET Web application - they do not need to be registered in order to use them within your application. The SQL CE database engine then runs in-memory within your application. When your application shuts down the database is automatically unloaded.
New Embedded Database Support with ASP.NET
Thursday, July 01, 2010
Developers today build and test ASP.NET sites and applications using one of two web-servers:
- The ASP.NET Development Server that comes built-into Visual Studio
- The IIS Web Server that comes built-into Windows
Both of the above options have their pros and cons, and many ASP.NET developers have told us: “I wish I could have the ease of use of the ASP.NET Development Server, but still have all the power and features of IIS”. Today I’m happy to announce a new, free option that we are enabling – IIS Express - that combines the best characteristics of both, and which will make it easier to build and run ASP.NET sites and applications. IIS Express will work with VS 2010 and Visual Web Developer 2010 Express, will run on Windows XP and higher systems, does not require an administrator account, and does not require any code changes to use. You will be able to take advantage of it with all types of ASP.NET applications, and it enables you to develop using a full IIS 7.x feature-set.
Read Full Article: http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx
Friday, April 30, 2010
What's New:
This major release of Enterprise Library contains many compelling new features and updates that will make developers more productive. There are no new blocks; instead the team focused on making the existing blocks shine, on testability, maintainability and learnability. The new features include:
- Major architectural refactoring that provides improved testability and maintainability through full support of the dependency injection style of development
- Dependency injection container independence (Unity ships with Enterprise Library, but you can replace Unity with a container of your choice)
- Programmatic configuration support, including a fluent configuration interface and an XSD schema to enable IntelliSense
- Redesign of the configuration tool to provide:
-
- A more usable and intuitive look and feel
- Extensibility improvements through meta-data driven configuration visualizations that replace the requirement to write design time code
- A wizard framework that can help to simplify complex configuration tasks
- Data accessors for more intuitive processing of data query results
- Asynchronous data access support
- Honoring validation attributes between Validation Application Block attributes and DataAnnotations
- Integration with Windows Presentation Foundation (WPF) validation mechanisms
- Support for complex configuration scenarios, including additive merge from multiple configuration sources and hierarchical merge
- Optimized cache scavenging
- Better performance when logging
- Support for the .NET 4.0 Framework and integration with Microsoft Visual Studio 2010
- Improvements to Unity
- A reduction of the number of assemblies
Microsoft Enterprise Library 5.0 contains the following application blocks:
- Caching Application Block. Developers can use this application block to incorporate a cache in their applications. Pluggable cache providers and persistent backing stores are supported.
- Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications.
- Data Access Application Block. Developers can use this application block to incorporate standard database functionality in their applications, including both synchronous and asynchronous data access and returning data in a range of formats.
- Exception Handling Application Block. Developers and policy makers can use this application block to create a consistent strategy for processing exceptions that occur throughout the architectural layers of enterprise applications.
- Logging Application Block. Developers can use this application block to include logging functionality for a wide range of logging targets in their applications. This release further improves logging performance.
- Policy Injection Application Block. Powered by the Interception mechanism built in Unity, this application block can be used to implement interception policies to streamline the implementation of common features, such as logging, caching, exception handling, and validation, across a system.
- Security Application Block. Developers can use this application block to incorporate authorization and security caching functionality in their applications.
- Unity Application Block. Developers can use this application block as a lightweight and extensible dependency injection container with support for constructor, property, and method call injection, as well as instance and type interception.
- Validation Application Block. Developers can use this application block to create validation rules for business objects that can be used across different layers of their applications.
Enterprise Library also includes a set of core functions, including configuration and instrumentation, and object lifecycle management. These functions are used by all other application blocks.
The detailed list of all changes is included in the Enterprise Library documentation and also online.
Thursday, April 15, 2010
Indicates whether the specified String object is nullNothingnullptra null reference (Nothing in Visual Basic) or an Empty string.
You want to use the string.IsNullOrEmpty method to check for string references that are null, or empty strings. Strings are reference types and can be equal to the null value like any other reference type. Strings can also be empty, meaning their values equal "" and they have zero length. Here we see some examples and benchmarks of string.IsNullOrEmpty in the C# language.
String.IsNullOrEmpty(String)
C# 2.0 has brought with it loads of language features. Some made a huge difference and few less talked about. One of them is String's IsNullOrEmpty method, let's do a comparision of C# 1.1 and 2.0 logic to check for a empty and null string.
We have been doing this past several years, a condition where in we check a string object is null or empty and perform certain actions based on the the outcome of the condition.
//C# 1.1 Sample code
string sParam = null;
if( (sParam != null) && (sParam != string.Empty) ) {
//Do something
}
//C# 2.0 Sample code
string sParam = null;
if( string.IsNullOrEmpty(sParam) ) {
//Do something
}
Now the difference is pretty clear....same logic but well simplified. Many of you will be wondering why the method IsNullOrEmpty is a static member of string class. Point here is we are checking for null or empty string and if that instance of string is null then it will throw a NullReference exception.
For more information: http://msdn.microsoft.com/en-us/library/system.string.isnullorempty.aspx
I started getting this weird exception on my screen every time I try to open project in Microsoft Visual 2008. The same for new or any other project of any kind. I tried to reinstall Microsoft Visual 2008 few times, with the same result.
Error: "Project <Name> could not be opened because the Microsoft Visual C# .NET compiler could not be created"
Solution: (devenv /ResetSkipPkgs) Command
/ResetSkipPkgs (devenv.exe) Clears all options to skip loading added to VSPackages by users wClears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, then starts Visual Studio.
Devenv /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276(VS.80).aspx
http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/20/129520.aspx
Using .NET you can easily generate a random number withing a range, by using the Random class. In the following example a random number produce a number from 00000 through 99999
The Random class defined in the .NET Framework class library provides functionality to generate random numbers. The Random class constructors have two overloaded forms. It takes either no value or it takes a seed value.
The Random class has three public methods - Next, NextBytes, and NextDouble. The Next method returns a random number, NextBytes returns an array of bytes filled with random numbers, and NextDouble returns a random number between 0.0 and 1.0. The Next method has three overloaded forms and allows you to set the minimum and maximum range of the random number.
The following code returns a random number:
var randNum = new Random();
String myNumber = randNum.Next(0, 99999).ToString("00000"); // Number from 00000 through 99999
For more information: http://msdn.microsoft.com/en-us/library/system.random%28VS.71%29.aspx
Start with the free download, review your website, and make changes fast. The SEO Toolkit with its detailed analysis and
search engine friendly suggestions helps improve the relevance of your website in search results right away. The
SEO Toolkit will help you increase website traffic and revenue, influence and update search engines, and improve customer experience. For more information or to download,
please visit the Free SEO Toolkit page.
When you use the ASP.NET AJAX-Enabled Web Site template to create a new Web site, you add a specialized web.config file that contains various configuration entries for enabling ASP.NET AJAX functionality on the server side. The ASP.NET AJAX Extensions documentation breaks down each of the configuration tags added into web.config.
The top portion of the web.config file contains several different section configuration tags. These tags define classes that perform the task of parsing configuration data defined in web.config at run time. For example, the scriptResourceHandler section tag specifies that the System.Web.Configuration.ScriptingScriptResourceHandlerSection class should be used to parse data defined in the scriptResourceHandler tag shown here:
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true"/>
</scripting>
</system.web.extensions>
This tag provides configuration information used by the run-time engine to determine if script resources embedded in assemblies are compressed and/or cached. Both compression and caching are enabled by default, although the compression setting will not have an effect in browsers that don't support compression.
Thursday, November 12, 2009
Problem: Some time in ajax web development you face this error during website building.
"Server Error in '/' Application.
Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) 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.IO.FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) "
Resolution:
On some locked down systems, this account may not by default have read security access to a website's content directories, the application root directory, or the web site root directory. In this case you will receive the following error when requesting pages from a given web application:
To fix this you will need to change the security permissions on the appropriate directories.
Specifically, ASP.NET requires read, execute, and list access for the ASPNET account for the web site root (for example: c:\inetpub\wwwroot or any alternative site directory you may have configured in IIS), the content directory and the application root directory in order to monitor for configuration file changes. The application root corresponds to the folder path associated with the application virtual directory in the IIS Administration tool (inetmgr).
For this example, the ASPNET account needs the read permissions defined above for content in both the myapp and the wwwroot directory. A single inherited ACL on the root folder can also be optionally used for both directories if they're nested.
To add permissions to a directory, perform the following steps:
- Using the Windows explorer, navigate to the directory
- Right click on the directory folder and choose "Properties"
- Navigate to the "Security" tab on the property dialog
- Click the "Add" button and enter the machine name followed by the ASPNET account name. For example, on a machine named "webdev", you would enter webdev\ASPNET and hit "OK".
- Ensure that the ASPNET account has the "Read & Execute", "List Folder Contents", and "Read" checkboxes checked.
- Hit OK to dismiss the dialog and save the changes.
- To make the file/folder inherit permissions from a parent folder (if it does not), select the Allow inheritable permissions from the parent to propagate to this object and all child objects. Include these with entries explicitly defined here checkbox.
- To make the files and folders, which are contained in this folder, inherit the folder permissions defined here, select the Replace permission entries on all child objects with entries shown here that apply to child objects checkbox.
Thursday, March 12, 2009
http://www.prepareuktest.co.uk is designed to help people prepare to take the '
Life in the UK Test', which is now required by the Home Office if you are applying for naturalisation as a British citizen or for indefinite leave to remain in the UK.
On this website you will be able to test your knowledge and understanding of the information in the Life in the United Kingdom handbook. Our goal is to provide an easy to use online simulation of the actual british citizenship test.