![]() |
Universities connected via Video Con facility |
![]() |
With folks who attended session in-person at HEC |
I really enjoyed connecting with many students especially Universities in other than major cities.
You can find the slides below I used as reference:
Demystifying software engineering and everything in between
![]() |
Universities connected via Video Con facility |
![]() |
With folks who attended session in-person at HEC |
I really enjoyed connecting with many students especially Universities in other than major cities.
You can find the slides below I used as reference:
TypeScript is typed super-set of JavaScript and it helps you write JavaScript with static type checking and some sort of benefit of static typed language. For example, it let’s you define interfaces, object type, method type rather than everything as ‘var’. If you write a lot of JavaScript, consider evaluating it. However it’s still in preview version.
That is all for now, the boarding is about to start in next five minutes.
Keep Exploring!
<add key="LoginUrl" value="~/Account/Login"/>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="3000" />
authentication>
An important point for JavaScript intellisense is to add reference path to js files. If you have noticed in ASP.NET MVC 4 project templates there is a js file “_references.js”
This file add references of common scripts referred in project to support their intellisense. However the reference to “_references.js” is added as global references in Visual Studio -> Options -> Text Editor -> JavaScript -> Intellisense -> References
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
is pasted as
Vendor Specifics Generation: Many of the CSS3 properties required vendor specifics properties to work across web browsers. These include -moz, -webkit, -ms and -o. Consider following example below:
Yesterday, I faced a wired yet crazy issue. My machine has a bit freshly installed windows 7 and so while running web site hosted on local IIS, I was getting a pretty plain asp.net pages without CSS and Images being loaded properly.
After a little investigation, it appears to be a problem with Windows feature installation. All you have to do is run ‘optionalfeature’ command and make sure ‘Static Content’ option is checked.
Hope this would help you, if you face similar kind of issue.
I am sure most of you have used Error Logging Module and Handlers (ELMAH) for ASP.NET. ELMAH is one great open source project and real blessings for ASP.NET developers. If you don’t know about it, It’s a MUST SEE tool and in that case I would recommend you to read out Scott Ha introductory blog post on ELMAH.
BUT, in this post we are going to see how to configure ELMAH to work with WCF services because if you do that in a typical way then ELMAH is probably not going to work as expected and it won’t show you any unhandled exception.
So let’s get started!
I have created a new WCF Application project ElmahWithWcf containing one contract IDemoService and service implementation class DemoService.
To add ELMAH, you can either download it from project host site and configure it or you can simply use NuGet to download and automatically install/configure ELMAH.
NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio. Perhaps it really does simplify the life of developer when it comes to configure third party open source libraries. If you haven’t used NuGet, I would strongly encourage you to install it from Visual Studio Extension Manager (Tools –> Extension Manager). It’s free. You can also read NuGet documentation on CodePlex.com for further help or ping me back.
Once you have installed it, you can Add/Configure ELMAH via “Add Library Package Reference” in context menu of references folder.
In Add Library Package Reference, search elmah in online packages and click install, which will automatically download the required assemblies and configure entries in web.config as well. Isn’t it cool?
Just in case if you don’t believe, with NuGet you get all the config entries automatically!!!
With this ELMAH is now configured as you would typically do in ASP.NET web application, however, in contrast to ASP.NET app, it won’t log any unhandled exception that is raised in WCF service. For this, to work correctly, you need to create custom Error Handler implementing IErrorHandler as demonstrated in code snippet below:
public class ElmahErrorHandler: IErrorHandler { #region IErrorHandler Members public bool HandleError(Exception error) { return false; } public void ProvideFault(Exception error, MessageVersion version, ref Message fault) { if (error == null) { return; } if (HttpContext.Current == null) { return; } Elmah.ErrorSignal.FromCurrentContext().Raise(error); } #endregion } //Further in addition to that, you need to create a Service Behavior Attribute implementing Attribute and IServiceBehavior public class ServiceErrorBehaviorAttribute: Attribute, IServiceBehavior { private readonly Type errorHandlerType; public ServiceErrorBehaviorAttribute(Type errorHandlerType) { this.errorHandlerType = errorHandlerType; } #region IServiceBehavior Members public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection < ServiceEndpoint > endpoints, BindingParameterCollection bindingParameters) { } public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { IErrorHandler errorHandler; errorHandler = Activator.CreateInstance(errorHandlerType) as IErrorHandler; if (errorHandler != null) { foreach(ChannelDispatcherBase dispatcher in serviceHostBase.ChannelDispatchers) { ChannelDispatcher cd = dispatcher as ChannelDispatcher; cd.ErrorHandlers.Add(errorHandler); } } } public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { } #endregion } //And finally you need to apply the custom attribute on your service implementation class [ServiceErrorBehavior(typeof(ElmahErrorHandler))] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class DemoService: IDemoService { #region IDemoService Members public string GetData(int value) { throw new Exception("TEST"); return string.Format("You entered: {0}", value); } #endregion }
That is all you need to do for ELMAH to work with WCF.
At this point, ELMAH must show all unhandled exception in log file. For example, line number 9 throws an exception with message “Test”. If we invoke the service method, the ELMAH should log this exception. The log file can be browsed at http://ServerPath/elmah.axd
In fact, ELMAH is so convenient that we decided not to use Enterprise Library Logging Block and utilized ELMAH to log even handled exception as well (Yes another reason was timelines as well).
Did I hear How? Well, in that case you simply need to manually add one line in catch block.
This will inform/raise about the exception to ELMAH and so it will log the handled exception as well.
Hope this Helps!
In case of any feedback/experience, please do share…
Happy Coding!
ValidateRequest="false" or <pages validateRequest="false" />
<httpRuntime requestValidationMode="2.0"/>
And this should work!
Hope this helps!
Good Job NED Volunteers
Source: http://www.devnextug.org/2011/04/sessions-on-web-development-using.html
On request of students from NED University of Engineering and Technology, DevNext User Group recently organized two day sessions on Web Development using ASP.NET at NED University. The sessions were held on 12th and 19th March, 2011.
The purpose of facilitating such sessions was to provide students firm understanding of web architecture and development using HTML, JavaScript, CSS and ASP.NET.
We would like to thank speaker and our volunteers at NED University for organizing such useful sessions.
About Speaker:
Mr. Anas Raza is a graduate in Computer and Information System from NED University and currently working as Software Engineer at ITIM Pakistan.
About DevNext User Group:
DevNext is a user group which has been created with the intention of providing a platform for the Next Generation Designers & Developers sharing and discussing knowledge regarding different tools and technologies. Our mission from inception has been to develop a peer group of developers, designers, architects, and managers who are interested in learning, sharing and growing their knowledge and capabilities. The group’s vision is to provide members with a forum to hear top industry experts speak, learn and teach others who are interested in the same technologies as you and are facing the same challenges.
Interested in organizing technology sessions in your University? Please contact us at contact@devnextug.org and we will be happy to assist you.
Reference: http://edotnetdevs.wordpress.com/2010/12/04/event-summary-visual-studio-2010-ultimate-loadfest/
THANK YOU FOR ATTENDING VISUAL STUDIO 2010 ULTIMATE LOADFEST!
4th December 2010, we had another exciting event “Visual Studio 2010 Ultimate LoadFest”. The event was held at FAST- National University of Computer and Emerging Sciences, Karachi. We would like to thank all the organizers, speakers, participants and volunteers for making this event successful. Especially to our speakers Adil Ahmed Mughal, Jibran Jamshed and Munir Usman for their valuable time and attention to this event.
Agenda:
The first session focused more on the new features in Visual Studio 2010 IDE. The speaker started discussion on the New Project Dialog improvements and Start Page customization in Visual Studio 2010 then moving towards Core IDE improvements that includes WPF based editor, easy code navigation, improved IntelliSense, column selection, call hierarchy etc.
Adil then talked about how Visual Studio supports “Test Driven Development” and Code Focused development approach. Then ASP.NET improvements such as ASP.NET/HTML mark up snippets, Cleaner HTML, automatic HTML encoding were discussed. Finally, Visual Studio Extensibility (VSX) was discussed and some powerful/highly rated extensions such as Productivity Power Tools, Power commands etc were demonstrated to the audience.
The second session was about application life cycle management with major focus on Team Foundation Server 2010.
Jibran highlighted the issues faced by software development teams in the overall application life cycle and how Team Foundation Server (TFS), along with its numerous features and integration with other tools, can address those issues. He also demonstrated creating new team projects, selecting MSF process, code version control, work items and test cases execution against those work items in Visual Studio 2010 Ultimate and TFS.
The third session was on mastering debugging in Visual Studio 2010. The speaker started discussion from basic debugging, such as usage of debugging points, stack trace, immediate window etc, to advance debugging features offered by Visual Studio such as conditional debugging, hit count, filter, macros, data tips, debug labels etc.
In the end the Munir talked about the historical debugger (IntelliTrace) in VS 2010 ultimate and demonstrated how useful this feature is for developers.
In the end goodies were distributed via lucky draw. Following were the winners:
For more picture, please visit photo album on Emerging .NET Devs Facebook Page. If you have attended the event, please take out few minutes to fill the feedback form here.
In the end, we would like to thank our sponsors without them it would not be possible to organize this event. INETA, Wrox, Pluralsight, DevNext, Fast.NET