The document provides an overview of the table of contents for Visual Studio 2005. It outlines topics such as application and page frameworks, GUI controls, validation controls, master pages, themes and skins, collections and lists, data binding, data management with ADO.Net, working with XML, site navigation, security, state management, caching, debugging and error handling, and file I/O and streams. It also briefly discusses machine and web configurations.
Full credit to Microsoft but i have modified and updated the presentation to increase readability and simplicity. Hope you will enjoy knowing about Session Mgmt.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface
Building Responsive Applications with Uniface: Development (Part 2 of 3). In this webinar you will learn:
• Dynamic Server Page (DSP) Coding Recap
• User Interface Techniques
• Demo WebStart Application
• Code Walkthrough (View on our YouTube channel)
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface
Building Responsive Applications with Uniface: Deployment, part 3 or a 3 part series. In this presentation you will learn:
• Web Deployment Architecture
• Considerations
• Tomcat Servlet Engine Configuration
• Uniface Server Configuration
• Deployment Demo (View on our YouTube channel)
Webinar recording on: www.youtube.com/unifacesme
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...Uniface
Building Responsive Applications with Uniface: Getting Started (Part 1 of 3)
In this webinar you will learn:
• Requirements for a new project
• Development Environment walkthrough
• Application architecture considerations
Java EE 8 security and JSON binding APIAlex Theedom
Java EE Security and JSON Binding are two new APIs in the Java EE 8 release. The security API provides consistencies between containers with a simple annotation-driven model while JSON Binding completes Java EEs JSON APIs and is a real alternative to Jackson and Gson. In this presentation, I will walk through coding examples from both APIs and by the end of the presentation, you will understand how these two new APIs add to the advancement of the Java EE platform.
Full credit to Microsoft but i have modified and updated the presentation to increase readability and simplicity. Hope you will enjoy knowing about Session Mgmt.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface
Building Responsive Applications with Uniface: Development (Part 2 of 3). In this webinar you will learn:
• Dynamic Server Page (DSP) Coding Recap
• User Interface Techniques
• Demo WebStart Application
• Code Walkthrough (View on our YouTube channel)
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface
Building Responsive Applications with Uniface: Deployment, part 3 or a 3 part series. In this presentation you will learn:
• Web Deployment Architecture
• Considerations
• Tomcat Servlet Engine Configuration
• Uniface Server Configuration
• Deployment Demo (View on our YouTube channel)
Webinar recording on: www.youtube.com/unifacesme
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...Uniface
Building Responsive Applications with Uniface: Getting Started (Part 1 of 3)
In this webinar you will learn:
• Requirements for a new project
• Development Environment walkthrough
• Application architecture considerations
Java EE 8 security and JSON binding APIAlex Theedom
Java EE Security and JSON Binding are two new APIs in the Java EE 8 release. The security API provides consistencies between containers with a simple annotation-driven model while JSON Binding completes Java EEs JSON APIs and is a real alternative to Jackson and Gson. In this presentation, I will walk through coding examples from both APIs and by the end of the presentation, you will understand how these two new APIs add to the advancement of the Java EE platform.
The Uniface Lectures are an ongoing series of free monthly technical webinars that cover a wide range of useful topics. In this Lectures webinar on Application & Infrastructure Security we cover the following topics:
• Introduction
• Tomcat hardening
• Closing remarks
Full webinar video recording can also be found on: youtube.com/unifacesme
Spring Security is a framework that focuses on providing both authentication and authorization to Java applications. Like all Spring projects, the real power of Spring Security is found in how easily it can be extended to meet custom requirements. In this presentation Rob will start with an insecure application and incrementally Spring Security 4 to demonstrate how easily you can secure your application. Throughout the presentation, new features found in Spring Security 4 will be highlighted. Whether you are new to Spring Security or are wanting to learn what is new in Spring Security 4, this presentation is a must!
The MVVM pattern is a widely used architectural patterns that makes easier for developers to separate the business logic of an application from the user interface, allowing to create applications that are easier to test and maintain over time. However, when it comes to create a new project, there are some challenges to face: we need to setup every time the required infrastructure, we need to understand how to handle scenarios that in an application written without using the pattern are apparently simpler to manage, etc. In this session we're going to see how Prism, an open source framework driven by the Community, can help to deliver better and faster a Xamarin Forms application built with the MVVM pattern, by allowing developers to focus on the core of the project rather than on the implementation of the pattern.
In this quality assurance training session, you will learn Selenium WebDriver. Topics covered in this course are:
• Selenium Components
• Introduction to Web Driver
• Downloading and Configuring Web Driver with Eclipse
• Web Driver Methods
• Web Driver Locators
• Interacting with different UI elements
• Synchronization, Alert and multiple window
• Dynamic Menus
• Cookie Management
• Launching different web browsers
• Introduction to Test NG
TO know more, visit this link: https://www.mindsmapped.com/courses/quality-assurance/get-practical-training-on-software-testing-quality-assurance-qa/
The Uniface Lectures are an ongoing series of free monthly technical webinars that cover a wide range of useful topics. In this Lectures webinar on Application & Infrastructure Security we cover the following topics:
• Introduction
• Tomcat hardening
• Closing remarks
Full webinar video recording can also be found on: youtube.com/unifacesme
Spring Security is a framework that focuses on providing both authentication and authorization to Java applications. Like all Spring projects, the real power of Spring Security is found in how easily it can be extended to meet custom requirements. In this presentation Rob will start with an insecure application and incrementally Spring Security 4 to demonstrate how easily you can secure your application. Throughout the presentation, new features found in Spring Security 4 will be highlighted. Whether you are new to Spring Security or are wanting to learn what is new in Spring Security 4, this presentation is a must!
The MVVM pattern is a widely used architectural patterns that makes easier for developers to separate the business logic of an application from the user interface, allowing to create applications that are easier to test and maintain over time. However, when it comes to create a new project, there are some challenges to face: we need to setup every time the required infrastructure, we need to understand how to handle scenarios that in an application written without using the pattern are apparently simpler to manage, etc. In this session we're going to see how Prism, an open source framework driven by the Community, can help to deliver better and faster a Xamarin Forms application built with the MVVM pattern, by allowing developers to focus on the core of the project rather than on the implementation of the pattern.
In this quality assurance training session, you will learn Selenium WebDriver. Topics covered in this course are:
• Selenium Components
• Introduction to Web Driver
• Downloading and Configuring Web Driver with Eclipse
• Web Driver Methods
• Web Driver Locators
• Interacting with different UI elements
• Synchronization, Alert and multiple window
• Dynamic Menus
• Cookie Management
• Launching different web browsers
• Introduction to Test NG
TO know more, visit this link: https://www.mindsmapped.com/courses/quality-assurance/get-practical-training-on-software-testing-quality-assurance-qa/
The complete ASP.NET (IIS) Tutorial with code example in power point slide showSubhas Malik
SP.NET is a server-side Web application framework designed for Web development to produce dynamic Web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.
Generating the Server Response: HTTP Status CodesDeeptiJava
In this session you will learn:
Format of the HTTP response
How to set status codes
What the status codes are good for
Shortcut methods for redirection and error pages
A servlet that redirects users to browser-specific pages
A front end to various search engines
For more information, visit this link: https://www.mindsmapped.com/courses/software-development/online-java-training-for-beginners/
Ajax Performance Tuning and Best PracticesDoris Chen
Ajax Performance Tuning and Best Practices
Perhaps the most primary motivation to develop Ajax application is to have better user experience hence how to achieve the optimized response time becomes an important aspect in Ajax performance optimization. In this session, we will focus on discussing the improvement of the network transfer time and the JavaScript processing time as the server response is already generally well understood. We will use an Ajax framework case study to show how an Ajax optimization process can be used to optimize the performance. During the optimization process, we will demonstrate how to measure the performance, how to determine the bottlenecks and how to resolve the problems by applying various best practice. Various tools like NetBeans, Firebug, and YSlow will be illustrated to show when to use what and how to use them. The list of Ajax Performance tuning tips on combining CSS and JavaScript resources, setting the correct headers, using minifed JavaScript, GZip contents, and Strategically placing of CSS links and JavaScript tags will be discussed in the session.
Intermediate level Ajax and Enterprise developers can really benefit from this session.
After the session, the audience will be able to:
-apply Ajax Performance Optimization process
-choose the right tool and use them
-lleverage various best practice and performance tuning tips
-improve their Ajax application response time ultimately
Perhaps the most primary motivation to develop Ajax application is to have better user experience hence how to achieve the optimized response time becomes an important aspect in Ajax performance optimization. In this session, we will focus on discussing the improvement of the network transfer time and the JavaScript processing time as the server response is already generally well understood. We will use an Ajax framework case study to show how an Ajax optimization process can be used to optimize the performance. During the optimization process, we will demonstrate how to measure the performance, how to determine the bottlenecks and how to resolve the problems by applying various best practice. Various tools like NetBeans, Firebug, and YSlow will be illustrated to show when to use what and how to use them. The list of Ajax Performance tuning tips on combining CSS and JavaScript resources, setting the correct headers, using minifed JavaScript, GZip contents, and Strategically placing of CSS links and JavaScript tags will be discussed in the session.
Intermediate level Ajax and Enterprise developers can really benefit from this session.
After the session, the audience will be able to:
-apply Ajax Performance Optimization process
-choose the right tool and use them
-lleverage various best practice and performance tuning tips
-improve their Ajax application response time ultimately
CyberLab Training Division :
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites. It allows you to use a full featured programming language such as C# or VB.NET to build web applications easily.
This tutorial covers all the basic elements of ASP.NET that a beginner would require to get started.
Audience
This tutorial has been prepared for the beginners to help them understand basic ASP.NET programming. After completing this tutorial you will find yourself at a moderate level of expertise in ASP.NET programming from where you can take yourself to next levels.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding of .NET programming language. As we are going to develop web-based applications using ASP.NET web application framework, it will be good if you have an understanding of other web technologies such as HTML, CSS, AJAX. etc
ASP.NET supports three different development models:
Web Pages, MVC (Model View Controller), and Web Forms.
For More Details.
Visit: http://www.cyberlabzone.com
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
1. Table of contents
Introduction to VS 2005
Application and Page Frameworks
GUI Controls
Validation Server Controls
Working with Master Pages
Themes & Skins
Collections & Lists
Data Binding
Data Management with ADO.Net
Working with XML
Site Navigation
Security
State Management
Caching
Debugging & Error Handling
File I/O & Streams
Configurations
2. We can access an aspx web application by
means of virtual path.
http://localhost/VirtualDirectoryName/Defau
lt.aspx
If Default.aspx file exists in the application,
this URL would open the file in browser.
We can also give any other valid aspx file
name in the browser to view that file
3. Threats faced by an application
◦ Spoofing
◦ Tampering
◦ Repudiation
◦ Information disclosure
◦ Denial of Service
◦ Elevation of privilege
4. Security in the context of ASP.NET
application involves 3 fundamental terms
Authentication
◦ is the process of identifying users who can use
the application (password checking)
Authorization
– Defining what operations the users can do and to what
level (access rights check)
Impersonation
◦ This is the technique used by a server application to
access resources on behalf of a client
5. Authentication Modes
◦ Windows Authentication – IIS authentication
◦ Forms Authentication - Application credential
verification
◦ Microsoft Passport Authentication
Specifying Authentication Mode
◦ Can be specified in the Web.config file as follows
<authentication mode=“Windows" />
<authentication mode=“Forms" />
<authentication mode=“Passport" />
6. Basic
◦ IIS instructs the browser to send the user's credentials over HTTP
◦ Credentials are Base64 encoded which are not that much secure
Digest
◦ Digest authentication sends credentials across the network as a Message
Digest 5 (MD5) hash (encrypted)
Integrated Windows (Used in large organisation connected with
Network)
◦ Uses either NTLM challenge/response or Kerberos to authenticate users
with a Windows NT Domain or Active Directory account
◦ A Hash of the credentials is sent, password is encrypted and sent
.NET Passport
◦ The credentials that are registered with Microsoft which can be used with
any microsoft application like – hotmail, msn messenger or skydrive or
windows Live etc
7. We can allow or deny Users using authorization tag in
web.config file
<authorization>
<deny users="?"></deny>
<allow users="*" /> <!-- Allow all users -->
<!--
<allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
8. Can store credentials in web.config files
For Login page, only if given the following
credentials it will allow.
<authentication mode="Forms">
<forms name="Login" loginUrl="Login.aspx">
<credentials passwordFormat="Clear">
<user name="smith" password="manager"></user>
<user name="Smith" password="manager"></user>
</credentials>
</forms>
</authentication>
9. Web forms are created and destroyed each time a client makes a
request
Page state is not retained
◦ For postbacks
◦ Between pages
State management is implemented using
◦ Client side options
Viewstate
Cookies
QueryString
◦ Server side options
Application
Session
Database support
10. Stores information as hidden fields
ViewState is enabled for every page by default
Saving Arraylist in a view state
protected void Page_PreRender(object sender, EventArgs e)
{
ViewState.Add("arrayListInViewState", PageArrayList);
}
We can access the same as follows
ViewState[“arrayListInViewState”]
11. To store small amounts of information on a client
To store user-specific information
Store as key/value pair
//Create a cookie
HttpCookie uname = new HttpCookie("UserName");
uname.Value = txtUser.Text;
//Add the cookie
Response.Cookies.Add(uname);
//Set the Expiry date for the cookie
Response.Cookies["UserName"].Expires = d1.AddYears(2);
//Retrive the value of cookie
if(Request.Cookies["UserName"] != null) {
//Display the value of cookie
lblUser.Text = Request.Cookies["UserName"].Value;
}
12. Easy way to pass information
◦ Between pages
Way to pack information with URL
The URL with a query string look like below
http://localhost/Demo/Default.aspx?Uname=“guest”
To send page data as query string
Response.Redirect("welcome.aspx?category="+txtCategory.T
ext)
To retrieve data in next page
lblCategory.Text=“We welcome” +
Request.QueryString[“category”];
13. ◦ Can store information that we want to keep local to the current
session (single user)
◦ We can store values that need to be persisted for the duration of a
user
◦ Every user session will be assigned a unique SessionId
protected void Session_Start(Object sender, EventArgs e)
{
Session["userName"] =“guest";
}
protected void Session_End(Object sender, EventArgs e)
{
Session.Remove("userName");
}
14. Session state can be stored in three ways
◦ InProc
Stores session data in the memory of the ASP.NET worker process
Provides faster access to these values
Session data is lost when the ASP.NET worker process is recycled
Need to give in the Web.config file as follows
<sessionState mode="InProc“/>
◦ StateServer
Uses a stand alone window service (State Server) to store session variables
Independent of IIS as it can run as separate service
Better load balancing management as clustered servers can share their session
information
Need to give in the Web.config file as follows
<sessionState mode=" StateServer“/>
15. ◦ SQLServer
Similar to State Server, except that the information persists in MS-SQL
Server database tables
Need to give the following in Web.config file
<sessionState mode=“SQLServer“/>
Note: To use SQL Server as session state store, create the necessary
tables and stored procedures
.NET SDK provides us with a SQL script InstallPersistSqlState.sql
16. Provides a mechanism for storing data that is accessible to all users
using the Web Application
Are declared in a special file called as Global.asax
void Application_Start() {
Application["startTime"] = DateTime.Now.ToString();
}
void Application_End() {
Application["startTime"] = null;
}
17. Database support may be used to maintain state of your Web
site
Advantages of Using a Database to Maintain State
◦ Security
◦ Storage capacity
◦ Data persistence
◦ Robustness and data integrity
◦ Accessibility
◦ Widespread support
Disadvantages of Using a Database to Maintain State
◦ Complexity
◦ Performance considerations
18. ◦ In ASP.NET, page gets processed and is destroyed
for every request
◦ Some times, dynamic contents of page may not
change frequently
◦ ASP.NET holds such content in memory so that it
can be delivered again efficiently without
processing
19. Use the @OutputCache page directive to cache a Web form in
the server’s memory
◦ The Duration attribute of @OutputCache directive’s controls
how long the page is cached.
Setting VaryByParam="None” caches only one version of the
web form
// Web form is Cached for 60 seconds
<%@ OutputCache Duration="60" VaryByParam="None" %>
20. //This page sends item (Infopage.aspx)
private void btnSubmit_Click(object sender,
System.EventArgs e)
{
Response.Redirect("NextPageVaryParam.aspx?id="+drpTimeZone
.SelectedItem);
}
// Web form is Cached for dropdownlistbox selected item
//This page is cached depend on item selected from
//infopage.aspx
<%@ OutputCache Duration="60" VaryByParam=“id" %>
21. Cache regions of a page content
Attribute used
◦ @ OutputCache
◦ VaryByParam -varies cached results based on name/value pairs
sent using POST or GET
◦ VaryByControl -varies the cached fragment by controls within the
user control
<%@ OutputCache Duration="120" VaryByParam="none"
VaryByControl="Category" %>
22. Data caching is storing of data internal to a web application
This enables to use the cached object across all the pages of
the application
Cache is global to entire web application and is accessible to
all the clients of that application
The lifetime of such cached objects is that of the application
itself
If the application is restarted then all the cached objects are
destroyed
Expiry time can be set for cache objects
◦ Absolute Expiry (Absolute value)
◦ Sliding Expiry (relative value – from now onwards 5 seconds)
23. Visual studio 2005 provides a built in
debugger.
Breakpoint – Press F9 to insert break point at
a location or Select Insert Break Point from
Debug Menu
We can Step Over using (F10 key) or Step Into
using (F11 key) a function
24. .NET CLR provides structured Exception handling
◦ Using try catch block
ASP.NET provides declarative error handling
◦ Automatically redirect users to error page when unhandled
exceptions occur
◦ Prevents ugly error messages from being sent to users
The Web.Config should have these lines
<configuration>
<customErrors mode=“On” defaultRedirect=“error.htm”>
<error statusCode=“404”
redirect=“adminmessage.htm”/>
<error statusCode=“403”
redirect=“noaccessallowed.htm”/>
</customErrors>
</configuration>
25. The mode attribute can be one of the following:
◦ On
Error details are not shown to anybody, even local users
If you specify a custom error page it will be always used
◦ Off
Everyone will see error details, both local and remote users
If you specify a custom error page it will NOT be displayed
◦ RemoteOnly
Local users will see detailed error pages
Remote users will be presented with a concise page notifying
them that an error occurred
Note : Local user means User browsing the site on the same
machine where web applications are deployed
26. System.IO name space will have Methods and
classes for File Handling
FileInfo and DirectoryInfo class helps us in
managing files and directory
Both these classes are inherited from
FileSystemInfo class
27. Used to discover general characteristics
about a given file or directory.
Properties
- Attributes
- Creation Time
- Exists
- Extension
- Full Name
- Last Access Time
- Last Write time
- Name
29. FileInfo FI = new FileInfo(@"form1.cs“)
MessageBox.Show(FI.DirectoryName.ToString());
MessageBox.Show(FI.Extension.ToString());
MessageBox.Show(FI.LastAccessTime.ToString());
MessageBox.Show(FI.LastWriteTime.ToString());
30. Streams are channels of communication between programs
and source/destination of data
◦ A stream is either a source of bytes or a destination for
bytes.
Provide a good abstraction between the source and
destination
Abstract away the details of the communication path from I/O
operation
Streams hide the details of what happens to the data inside
the actual I/O devices.
Streams can read/write data from/to blocks of memory, files
and network connections
Stream can be File or Console or Network or Hardware
31. Byte Stream
◦ FileStream – Works with File
◦ MemoryStream – Works with array
◦ BufferedStream - Optimized read/write operations
Character Stream
◦ TextReader
◦ TextWriter
32. FileStream class is used to read from, write to, open, and
close files on a file system
The MemoryStream class creates streams that have memory
as a backing store instead of a disk or a network connection
◦ encapsulates data stored as an byte array
BufferedStream
◦ A buffer is a block of bytes in memory used to cache data
◦ reduces the number of calls to the operating system
◦ Buffers improve read and write performance.
33. Both are abstract classes used read and write data using
characters from different streams
TextReader
◦ Represents a reader that can read a sequential series of
characters
TextWriter
◦ Represents a writer that can write a sequential series of
characters
To read and write we use derived classes like StreamReader
and StreamWriter
34. It can be used in the way StreamReader/Writer are used.
The BinaryReader methods
◦ bool ReadBoolean()
◦ byte ReadByte()
◦ char ReadChar()
◦ float ReadSingle()
◦ double ReadDouble()
◦ int ReadInt32()
The BinaryWriter method
-void Write( any single primitive type argument )
35. These two files helps us in setting
configurations
Machine.Config – Machine level configuration
Web.Config – Application level configuration
36. Configuration files can be stored in application folders
◦ Configuration system automatically detects changes
Hierarchical configuration architecture
◦ Applies to the actual directory and all subdirectories
Examples:
<compilation defaultLanguage="c#“ debug="true“/>
<sessionState>
<!--- sessionstate subelements go here -->
</sessionState>