<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Bharat Gupta</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/bharatgupta/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/bharatgupta/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:21:36 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>In-Memory Caching in ASP.NET MVC Core</title>
      <link>https://docs.microsoft.com/archive/blogs/bharatgupta/in-memory-caching-in-asp-net-mvc-core</link>
      <pubDate>Sun, 18 Dec 2016 22:30:05 GMT</pubDate>
      <dc:creator><![CDATA[bharatgupta04]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bharatgupta/?p=205</guid>
      <description><![CDATA[Cache is one of the reliable ways to prevent to retrieve the Data from data source that does not...]]></description>
      <content:encoded><![CDATA[<span style="color: #000000;font-family: Calibri">Cache is one of the reliable ways to prevent to retrieve the Data from data source that does not change frequently. Caching keeps a copy of data in a location that can be accessed more quickly than the source data. ASP.NET Core has rich support for keeping data in memory on the local server, which is referred to as in memory caching.</span>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshoot and debug web applications</title>
      <link>https://docs.microsoft.com/archive/blogs/bharatgupta/troubleshoot-and-debug-web-applications</link>
      <pubDate>Sun, 27 Nov 2016 19:15:05 GMT</pubDate>
      <dc:creator><![CDATA[Bharat Gupta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bharatgupta/?p=105</guid>
      <description><![CDATA[The developer who has never had to troubleshoot or debug an application is a rare person indeed....]]></description>
      <content:encoded><![CDATA[The developer who has never had to troubleshoot or debug an application is a rare person indeed. Even the best-planned projects can experience situations in which something does not work as expected.

Troubleshooting and debugging an application is a normal process when creating or modifying an application. Fortunately, Microsoft Visual Studio presents many ways to trace through your code while the application is running. Traces can help you understand what is occurring inside your application. The ability to capture and identify errors in both development and production environments is a powerful tool that will help ensure that ASP.NET MVC correctly manages application.

<strong>Design an exception handling strategy</strong>

Exceptions are a standard part of applications. Even if your software is error free, your application can throw exceptions or experience other problems due to external factors, such as improper data input or network problems.

As you design your ASP.NET MVC application, you should consider potential problem points, such as calling a web service for data or accessing files on a file share, and determine what you will do when an error occurs. Also, consider whether you will notify users and, if so, what you will display in a message. You also need to choose recovery options to keep your application in a normal running state and the kind of diagnostic information you should capture.

<strong>Handling exceptions across multiple layers</strong>

There are different places in an application in which you can throw an exception, and what you do with those exceptions will be affected by where the exceptions were thrown. When you are writing an application that enforces separation of concern, determining how best to manage errors is complicated by this separation. If all work is done in the same layer, manag­ing errors is easy because you do not have to negotiate boundaries.

However, multiple layers’ complicate things and require you to understand layer rules. A layer should know only about the layer it communicates with, and it should have no knowl­edge about layers that might be calling it. A traditional three-tier application, shown in Figure, has a data layer, a business layer, and a user interface (UI) layer. The data layer doesn’t know anything about the other layers, the business layer knows about the data layer but nothing about the UI, and the UI layer knows only about the business layer but not the data layer.

[caption id="attachment_125" align="alignnone" width="300"]<a href="https://msdnshared.blob.core.windows.net/media/2016/11/136.png"><img width="300" height="80" class="size-medium wp-image-125" alt="Traditional three-tier application" src="https://msdnshared.blob.core.windows.net/media/2016/11/136-300x80.png" /></a> Traditional three-tier application[/caption]

Because of the relationships between the layers, errors in the data layer will make no con­textual sense in the UI. They do, however, make sense to the business layer. This shows one of the primary architectural considerations when needing to handle exceptions across multiple layers. A layer should ensure that no errors pass through. The business layer, for example, should capture all data layer errors. It should do whatever work needs to be done as a result of those exceptions and determine whether an exception should be sent to the UI for render­ing to the user.

Consider this example: A user comes to your website and attempts to log in. Your website, or your complete ASP.NET MVC application, is acting as the UI layer in an n-tiered application and calls the business layer with the login information. The business layer reaches out to the data layer to determine whether there is a match. However, the database server is down, so when the business layer makes its call, it gets an error. There are several choices at this point. You can pass the error up to the UI layer, or analyze it in the business layer and decide what to tell the UI layer. Perhaps your application throws an <em>EntitySqlException </em>or <em>SqlException</em>.

Does your user need to know that information? Probably not, so it would make sense to capture the error when you get it and then log it. However, because it is a fatal exception, you need to tell the user something. It would be reasonable to throw a new custom exception such as a <em>DatabaseException</em>. Because this would no longer be a data layer exception, it would be sensible for the user interface to manage it.

The same approach is appropriate when working within your ASP.NET MVC application. Model errors, for example, should be managed by the controller. If work needs to be done to manage the error, logically it should be managed in the controller. Controller errors are usually propagated out of the controller and into the processing layer. You will typically be catching and managing these errors through the use of MVC-specific error handling protocols.

<strong>Displaying custom error pages, creating your own <em>HTTPHandler</em>, and setting Web.config attributes</strong>

Although IIS comes with default error pages, it is rare for those pages to look like they belong to an application and to provide the appropriate level of information to the users. Developers customize the error pages as part of their error management and handling process.

You need to determine which errors will have custom pages and what kind of information should be displayed on the pages. When implementing custom error pages, there are at least two primary error pages: one to handle 404 Page Not Found errors and a more generic error display page. However, your application might need to display different information based on the error condition or the portion of the site the user is visiting. You can create these pages as you would any other ASP.NET MVC page: with a view and a controller. You can also pass in a model from your error handler that contains the error information to display information that might be useful to display to the user.

Let’s look at an MVC application with a standard routing construct. In this series of ex­amples, we use a controller called <em>ErrorManagerController </em>that has various action methods for each of the HTTP statuses, such as Status400, as well as a default general action method of <em>ServerError </em>to manage the display of custom error pages.

The Global.asax page is one of the ways you can support custom error pages. Because the ASP.NET MVC framework is based on ASP.NET, there are some shared features, especially in the Global.asax file. The <em>Application_Start </em>method is the most common one used in both ASP.NET and ASP.NET MVC. You can also use the <em>Application_Error </em>method, a global error handler that is called when an unhandled error makes it through the application stack. You can manage an error using the <em>Application_Error </em>method in the Global.asax file.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/227.png"><img width="487" height="258" class="alignnone wp-image-135" alt="Managing Error using Application_Error method" src="https://msdnshared.blob.core.windows.net/media/2016/11/227-300x159.png" /></a>

The method gets the last exception on the server, logs the information, clears the error, and then forwards the user back to the custom error page. In this case, the user is just redirected to the <em>ErrorManager </em>controller’s <em>ServerError </em>method. However, more logic could be put into the method to redirect the user to more applicable error pages. This decision could be based on the type of error as well as whether you need to pass the error to the controller, in which it can determine what, if anything, should be displayed to the user.

You can also set error information in the Web.config file by adding error nodes to the &lt;customErrors&gt; section of the &lt;system.web&gt; area. The following example redirects the ap­propriate status code to the indicated URL:

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/322.png"><img width="677" height="140" class="alignnone wp-image-145" alt="Sample of XML Configuration" src="https://msdnshared.blob.core.windows.net/media/2016/11/322-300x62.png" /></a>

The <em>customErrors </em>element has two attributes that are of interest: <em>mode </em>and <em>defaultRedirection</em>. There are three values for <em>mode</em>: <em>On</em>, <em>Off</em>, and <em>RemoteOnly</em>. <em>On </em>and <em>Off </em>specify whether custom errors should be used. <em>RemoteOnly </em>specifies that custom errors are displayed only to remote users while standard error pages are shown to local users. <em>RemoteOnly </em>is the default setting. The <em>defaultRedirection </em>attribute gives an overall han­dler. If an error occurs that is not handled with a more specific error element, this is the URL that will be presented to the user. HTTP 500 errors are generally handled through other means than configuration, such as filters or <em>OnException </em>handlers. You must set <em>&lt;httpErrors errorMode=”Detailed” /&gt; </em>in the &lt;system.webServer&gt; section of Web.config as well.

<strong>Handling first chance exceptions</strong>

First chance exceptions are exceptions before they have been handled by an error handler. Every error that occurs in an application begins the error-handling process as a first chance exception. You should try to detect first chance exceptions during the development process to determine how and why they are occurring. You can also capture exceptions during the application runtime and evaluate them at that point.

To configure Visual Studio to detect first chance exceptions, ensure that the Thrown box is checked for the Common Language Runtime Exception row in the DEBUG Exceptions dialog box, as shown in Figure.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/419.png"><img width="556" height="315" class="alignnone wp-image-155" alt="Enabling detection of first chance exceptions in Visual Studio" src="https://msdnshared.blob.core.windows.net/media/2016/11/419-300x170.png" /></a>

<strong>FIGURE </strong>Enabling detection of first chance exceptions in Visual Studio

When you make this selection, every exception thrown while running in debug mode will be captured by the debugger. You can examine the exception as soon as it is thrown to find and manage other exceptions that might be handled but should not be occurring, or to trace the error through the application flow to ensure that it is properly handled. Figure shows the outcome of an exception. As soon as it is thrown, the debugger catches the exception and displays it.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/516.png"><img width="519" height="420" class="alignnone wp-image-156" alt="Throw First Chance Exception" src="https://msdnshared.blob.core.windows.net/media/2016/11/516-300x243.png" /></a>

The ability to catch first chance exceptions in Visual Studio is a significant advantage. It helps you find problems that might be mistakenly hidden, such as those handled by an empty catch block or those that are entirely mishandled. Because exceptions affect performance, you can find errors that are being handled but should not be occurring, such as when trying to parse an object. You can identify those items and correct them, by changing the <em>Parse </em>method to a <em>TryParse </em>method, for example.

Capturing first chance exceptions in the debugger gives you the opportunity to manage and control exceptions before they make it to the production environment. However, that does not mean you can find all errors. An unexpected condition in production can cause a special error condition that did not occur during development. Fortunately, you can catch first chance exceptions in your ASP.NET MVC application by inserting code in the Global.asax file. Demonstrates how to handle <em>FirstChanceExceptions </em>in your application by setting the event handler<em>.</em>

<em> <a href="https://msdnshared.blob.core.windows.net/media/2016/11/616.png"><img width="491" height="280" class="alignnone wp-image-165" alt="Configure First Chance Exception in code" src="https://msdnshared.blob.core.windows.net/media/2016/11/616-300x171.png" /></a></em>

Using first chance exception functionality enables you to add logging or some other error management technique into your application that will be called whenever an exception in your application is thrown. This is just a notification, however, and it can cause its own set of issues. You also have to be careful when managing code within the <em>FirstChanceException </em>method because an error in that method causes a <em>FirstChanceException </em>to be called. This results in a <em>StackOverflow </em>exception because of the recursive calling of <em>FirstChanceException</em>.

The notification of the error does not do or allow anything to handle the error; it is simply a notification that the error has occurred. After the event, has been raised, and after the appli­cation calls the event handler, the application will continue to process the error normally. The Common Language Runtime (CLR) will also suspend thread aborts while the notification event is being processed, so the thread cannot be affected until after the handler has completed processing.

There are several ways to use first chance exception handling in your ASP.NET MVC appli­cation. The first is as a universal logging processor that standardizes logging efforts. However, you must be sure to handle the error. It might be appropriate to manage the work being done in the first chance exception handler through a configuration setting. This way you can control the risk of using first chance exception notification by enabling it only when needed.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 App: Workflow with Custom Task Outcomes</title>
      <link>https://docs.microsoft.com/archive/blogs/bharatgupta/sharepoint-2013-app-workflow-with-custom-task-outcomes</link>
      <pubDate>Sat, 27 Apr 2013 07:39:08 GMT</pubDate>
      <dc:creator><![CDATA[bharatgupta04]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bharatgupta/2013/04/27/sharepoint-2013-app-workflow-with-custom-task-outcomes/</guid>
      <description><![CDATA[In SharePoint 2013, there are many scenario in which use want to customized task form based upon...]]></description>
      <content:encoded><![CDATA[<p>In SharePoint 2013, there are many scenario in which use want to customized task form based upon business requirement. By default SharePoint provides “<strong>Approve</strong>” and “<strong>Reject</strong>” button at the bottom of your task form. So In this blog post I will explain you how we can create our own custom button for the workflow task form</p>  <p>&#160;</p>  <p>By performing some simple steps we can achieve the functionality to create custom button at the bottom of task form.</p>  <p><strong>Step 1:</strong> Open Visual Studio 2012, Create new project by selecting <strong>Apps for SharePoint 2013</strong> and select the “<strong>SharePoint - Hosted</strong>” apps and click on finish.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/4405.image_32078F49.png"><img title="image" style="margin: 5px 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8284.image_thumb_76D3B37D.png" width="644" height="470" /></a> </p>  <p>&#160;</p>  <p><strong>Step 2:</strong> Create a new site column with name “<strong>CustomTaskOutCome</strong>” of type <strong>OutcomeChoice.</strong></p>  <p>&#160;</p>  <p></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5226.image_039DE3CF.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/7762.image_thumb_76575ABB.png" width="644" height="113" /></a> </p>  <p>&#160;</p>  <p><strong>Step 3:</strong> Create Custom Content type and inherit from task as per shown in below screen</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5102.image_17875098.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5773.image_thumb_6A91EDBC.png" width="644" height="470" /></a> </p>  <p>&#160;</p>  <p><strong>Step 4:</strong> Now we need to add the “<strong>CustomTaskOutCome</strong>” site column and exiting “<strong>WorkflowInstanceId</strong>” field to the newly created content type.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8715.image_088FFBB1.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/0878.image_thumb_38D6D067.png" width="644" height="120" /></a> </p>  <p>Note: OOTB SharePoint workflow task content type is made up of these field and inherit from task content type. </p>  <p>&#160;</p>  <p><strong>Step 5:</strong> Create an Custom list instance based on existing <strong>Task</strong> list template as shown in below screenshot.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8054.image_7E0F2790.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8865.image_thumb_350905CA.png" width="644" height="471" /></a> </p>  <p>&#160;</p>  <p><strong>Step 6:</strong> To make our custom content type to be available for the list we need to add the content type binding to the list instance. So that at the time of list creating content type will automatically attached to list.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8053.image_00F46677.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/7455.image_thumb_7F439AA2.png" width="644" height="136" /></a> </p>  <p><strong>Step 7:</strong>&#160; Now we need to create the workflow so that we can perform action based upon our custom task outcome. </p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8103.image_48863F9E.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/1641.image_thumb_111008A3.png" width="644" height="447" /></a> </p>  <p><strong>Step 8: </strong>Select the type of workflow as a list and click on Next.</p>  <p>&#160;</p>  <p>&#160;</p>  <p></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8176.image_55DC2CD7.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/2112.image_thumb_1B148401.png" width="644" height="235" /></a></p>  <p><strong>Step 9:</strong> Provide the name of list where we need to run the workflow. Also make sure Task list will point to list which we have created and select finished. </p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/6560.image_325F8872.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/6445.image_thumb_78ACC8BA.png" width="549" height="484" /></a> </p>  <p></p>  <p><strong>Step 10:</strong> This is very important point because we need to attached the task activity to our custom content type. </p>  <ul>   <li><strong>ContentTypeId: </strong>This should be the id of content type which you have created. </li>    <li><strong>OutComeFIeldName:</strong> This should point to your custom site column which you have created.</li> </ul>  <blockquote>   <p>&#160;</p> </blockquote>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/1731.image_28A6F46F.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/2783.image_thumb_151994CE.png" width="644" height="362" /></a> </p>  <p><strong>Step 11: </strong>Now we need to deploy the solution to our O365 site. After deployment we need to add new item to custom list to run the workflow. Workflow will create the task and assigned to user. </p>  <p><strong>Step 12:&#160; </strong>Once task is created and edited by user. You will see there will be three button</p>  <p><strong></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8233.image_525A4995.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8540.image_thumb_41FED1DC.png" width="644" height="238" /></a> </p>  <p>&#160;</p>  <p>So you will see in below screenshot that workflow is acting upon custom column.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/0383.image_5F90ACDB.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/2450.image_thumb_168A8B15.png" width="644" height="213" /></a> </p>  <p>Hope this will help.. :)</p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 App Model: How to view list, list settings inside app</title>
      <link>https://docs.microsoft.com/archive/blogs/bharatgupta/sharepoint-2013-app-model-how-to-view-list-list-settings-inside-app</link>
      <pubDate>Sun, 10 Mar 2013 13:05:00 GMT</pubDate>
      <dc:creator><![CDATA[bharatgupta04]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bharatgupta/2013/03/10/sharepoint-2013-app-model-how-to-view-list-list-settings-inside-app/</guid>
      <description><![CDATA[Tip#1: SharePoint hosted app  Microsoft bring with new development approach “app” framework in...]]></description>
      <content:encoded><![CDATA[<p><strong>Tip#1: SharePoint hosted app</strong></p>  <p>Microsoft bring with new development approach “app” framework in SharePoint 2013 and whenever a new version of SharePoint brings a new development approach, developer often face some internal challenges.</p>  <p>In SharePoint 2013 each app create a new “<strong>app web”</strong> inside the “<strong>host web</strong>”. <strong>SharePoint App web</strong> does not own setting page or any navigation to traverse to list, list settings. </p>  <p>In this blog post I will provide you some useful tips about app model</p>  <p><strong>View List and List Settings: </strong>In normal scenario when we create any list using SharePoint host apps, there is no default option to see the list and go to list settings</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/2313.image_5E30E399.png"><img title="image" style="border: 0px currentcolor;margin-right: 0px;margin-left: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/6786.image_thumb_0A6D6A7E.png" width="825" height="203" /></a></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5125.image_68355EF7.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/6281.image_thumb_45FD5371.png" width="811" height="183" /></a> </p>  <p>&#160;</p>  <p>I have created the list with Name “<strong>QuickStatus</strong>” but there is no option for directly go to the list and view the content.</p>  <p><strong>Conclusion: </strong></p>  <ul>   <li>     <div align="left"> In order to go to the list directly type the name of the list after your app name</div>   </li> </ul>  <p>Example: “https://app-guid.contosoapps.com/sites/sphostedapps/&lt;AppName&gt;/Lists/QuickStatus/Allitems.aspx”</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/4520.image_6E4C85C5.png"><img title="image" style="margin-right: 0px;margin-left: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/8726.image_thumb_597A8D45.png" width="566" height="275" /></a> </p>  <ul>   <li>To View List Settings Click on the “<strong>Modify View</strong>” from the ribbon. You will see the “<strong>Settings</strong>” link on the top as shown in below screen. Click on the link and you will redirect to setting page.</li> </ul>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/2475.image_3DF58B42.png"><img title="image" style="margin-right: 0px;margin-left: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5773.image_thumb_2348EF29.png" width="306" height="72" /></a> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/3108.image_21982355.png"><img title="image" style="margin-right: 0px;margin-left: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/6758.image_thumb_4FC1F942.png" width="520" height="274" /></a></p>  <p>&#160;</p>  <p>You&#160; can also directly open in the browser by specifying the URL as shown in below screen by specifying the list id.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/4682.image_2023DAB6.png"><img title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/33/metablogapi/5734.image_thumb_0B51E236.png" width="788" height="30" /></a> </p>  <p>Hope this will help!</p>]]></content:encoded>
    </item>
    <item>
      <title>Create Cascading Dropdown in Browser enabled InfoPath form using InfoPath 2010</title>
      <link>https://docs.microsoft.com/archive/blogs/bharatgupta/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010</link>
      <pubDate>Thu, 07 Mar 2013 10:24:20 GMT</pubDate>
      <dc:creator><![CDATA[bharatgupta04]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/bharatgupta/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010/</guid>
      <description><![CDATA[In this post you will learn how we to create the cascading dropdown in browser enabled InfoPath...]]></description>
      <content:encoded><![CDATA[<p>In this post you will learn how we to create the cascading dropdown in browser enabled InfoPath form. As many of us know that in Office InfoPath 2007 it is very difficult to create the cascading dropdown without writing any single line of code but in InfoPath 2010 we can create without any code.</p>  <p>First create one List in SharePoint 2010 named with “CascadingDemo”. Create two column named with “Organization” and “Department”. Insert some sample data into the list as show in the screen:</p>  <p><a href="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSVpxpYQI/AAAAAAAAAGg/Xoi2MiR9cok/s1600-h/CascadingDemo%5B6%5D.png"><img title="CascadingDemo" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="CascadingDemo" src="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSWHZ5GFI/AAAAAAAAAGk/TsbigLs-kFw/CascadingDemo_thumb%5B4%5D.png?imgmax=800" width="409" height="122" /></a></p>  <p>In this list we have some organization that have different department. For example OrganizationA has two department like DepartmentA and DepartmentB. and OrganizationB has three department like DepartmentA, DepartmentB and DepartmentC.</p>  <p>Now we need to design the InfoPath form. So We need to Open the Microsoft InfoPath Designer 2010 and create a blank form. Make sure that form has “Web Browser Form”. See the screen shot below:</p>  <p><a href="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSWiOBMBI/AAAAAAAAAGo/cfOCDzDmNIQ/s1600-h/Advance%20Option%5B3%5D.png"><img title="Advance Option" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Advance Option" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSXKkcnVI/AAAAAAAAAGs/-H5KqaHXRZA/Advance%20Option_thumb%5B1%5D.png?imgmax=800" width="410" height="118" /></a></p>  <p><a href="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSX22xESI/AAAAAAAAAGw/lYavd6JpLjA/s1600-h/WebForm%5B3%5D.png"><img title="WebForm" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="WebForm" src="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSYS4VybI/AAAAAAAAAG0/4D0XqyHaHxE/WebForm_thumb%5B1%5D.png?imgmax=800" width="407" height="288" /></a></p>  <p>Now we need to create the Secondary Data Source to connect to SharePoint list.</p>  <p>Click on the data tab and then click on “From SharePoint List” under the ribbon.</p>  <p>Provide the name of the site where you want to connect to the SharePoint List.</p>  <p><a href="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSZLs9X4I/AAAAAAAAAG4/NThX7RVn-YE/s1600-h/Select%20the%20SharePoint%20Site%5B3%5D.png"><img title="Select the SharePoint Site" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Select the SharePoint Site" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSaEiwxVI/AAAAAAAAAG8/oxM0VEA5cqQ/Select%20the%20SharePoint%20Site_thumb%5B1%5D.png?imgmax=800" width="385" height="275" /></a></p>  <p>Now we need to select the list from where we want to fetch the data.</p>  <p><a href="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSann8xGI/AAAAAAAAAHA/IDkInyay_1k/s1600-h/Select%20the%20List%5B3%5D.png"><img title="Select the List" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Select the List" src="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSb-wGZqI/AAAAAAAAAHE/7C8BXuPl1dI/Select%20the%20List_thumb%5B1%5D.png?imgmax=800" width="383" height="274" /></a></p>  <p>Now we need to select the column from which we need information. So I selected the organization and department. And sorting the data by the Organization in ascending order. Then click next.</p>  <p><a href="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSceaNKSI/AAAAAAAAAHI/Dcp6DGPDX8E/s1600-h/Select%20the%20column%5B3%5D.png"><img title="Select the column" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Select the column" src="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSdMQl5aI/AAAAAAAAAHM/X4g9t_vlOVQ/Select%20the%20column_thumb%5B1%5D.png?imgmax=800" width="380" height="275" /></a></p>  <p><a href="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSdpUWepI/AAAAAAAAAHQ/PoWrPv0mbfY/s1600-h/Next%5B3%5D.png"><img title="Next" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Next" src="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSefEsFZI/AAAAAAAAAHU/xmU2SH-pNyo/Next_thumb%5B1%5D.png?imgmax=800" width="374" height="269" /></a></p>  <p>Provide the name of the Data Connection and click on finished.</p>  <p><a href="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSexVK2UI/AAAAAAAAAHY/3mspkuwYTlk/s1600-h/Finished%5B7%5D.png"><img title="Finished" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Finished" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSgNbARuI/AAAAAAAAAHc/RPjBUckyCm8/Finished_thumb%5B3%5D.png?imgmax=800" width="363" height="263" /></a></p>  <p>Now create the form which contains the two dropdown one for Organization and one for Department.</p>  <p><a href="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtShDGxW4I/AAAAAAAAAHg/P5LwEtt30lI/s1600-h/FormUI%5B3%5D.png"><img title="FormUI" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="FormUI" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtShnyqBAI/AAAAAAAAAHk/14Uuky2Wb9c/FormUI_thumb%5B1%5D.png?imgmax=800" width="363" height="103" /></a></p>  <p>Now we need to bind the dropdown with the Secondary Database.</p>  <p>Select on the Organization dropdown and go to the “Dropdown List box properties”. Bind the dropdown with the secondary data source. See the screenshot for more information.</p>  <p><a href="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSiorgK4I/AAAAAAAAAHo/TlO0eWMbkuM/s1600-h/Organization%5B3%5D.png"><img title="Organization" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Organization" src="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSjaUOHfI/AAAAAAAAAHs/h5mfRL5swuI/Organization_thumb%5B1%5D.png?imgmax=800" width="225" height="388" /></a></p>  <p>Now our main work begin from here to bind the “Department” dropdown. So that value shall be displayed based on the selection of “Organization” dropdown.</p>  <p>Select the “Department”dropdown and go to the properties. Select the secondary data source. Expand the “entries” section and select the “Department” node. Now most of us know that filter is not supported into the browser enable InfoPath form in MOSS 2007. but in SharePoint 2010 we can filter the data. So select the Department node and click on the filter data.</p>  <p><a href="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSj6llVBI/AAAAAAAAAHw/3-suTu2JG-0/s1600-h/Select%20Department%20Node%5B3%5D.png"><img title="Select Department Node" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Select Department Node" src="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSkXselfI/AAAAAAAAAH0/mos2HIvIv9A/Select%20Department%20Node_thumb%5B1%5D.png?imgmax=800" width="221" height="366" /></a></p>  <p>Now click on the “Add” button. and specify the filter condition. </p>  <p>Select&#160; if&#160; “Organization” is equal to “Select the field or group”. Click on the&#160; “Select a field or group” section from the dropdown.Refer the screenshot as display below:</p>  <p><a href="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSk_9tGDI/AAAAAAAAAH4/5SpOAVWzEzw/s1600-h/Filter%20data%5B7%5D.png"><img title="Filter data" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Filter data" src="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSlnO1ysI/AAAAAAAAAH8/60SAqzXg1nA/Filter%20data_thumb%5B3%5D.png?imgmax=800" width="419" height="353" /></a></p>  <p>Now select the “Main” from the dropdown and select the organization node then click on the ok button.</p>  <p><a href="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSmFGSUyI/AAAAAAAAAIA/iZ65bOP1TRo/s1600-h/Select%20Condition%20from%20main%20datasource%5B7%5D.png"><img title="Select Condition from main datasource" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Select Condition from main datasource" src="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSmgxpIUI/AAAAAAAAAIE/KrKwsR6zybU/Select%20Condition%20from%20main%20datasource_thumb%5B3%5D.png?imgmax=800" width="400" height="357" /></a></p>  <p>So we have set the rule that Select the department if “Organization” from the secondary data source is equal to “Organization” of main data source.</p>  <p>Now we are assuming that you have basic knowledge of the InfoPath form so you know the steps to publish the form.</p>  <p>For publishing the form you can go under the file tab and from the info section you can click the “Published the form”. and follow the instruction and form will be published into the SharePoint library. Here I have given the library name as “CascadingDemoSampleLib”. </p>  <p>Click on the New document so you will see the InfoPath form. Please see the screen shot :</p>  <p><a href="https://lh5.ggpht.com/_jG2dN_4T_w4/TQtSnAs5aHI/AAAAAAAAAII/tgm4j7joeCM/s1600-h/From%20Sample%5B8%5D.png"><img title="From Sample" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="From Sample" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSnqlmmyI/AAAAAAAAAIM/7Ez7QdGmsQc/From%20Sample_thumb%5B4%5D.png?imgmax=800" width="399" height="130" /></a></p>  <p><a href="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSoPw3NfI/AAAAAAAAAIQ/AXHSgwaDmp0/s1600-h/Form%20Sample%201%5B4%5D.png"><img title="Form Sample 1" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="Form Sample 1" src="https://lh3.ggpht.com/_jG2dN_4T_w4/TQtSoiyRztI/AAAAAAAAAIU/kzhrkj9N9is/Form%20Sample%201_thumb%5B2%5D.png?imgmax=800" width="400" height="145" /></a></p>  <p><a href="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSpP8kkcI/AAAAAAAAAIY/AEyxQQIg-Wo/s1600-h/From%20Sample%202%5B4%5D.png"><img title="From Sample 2" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="From Sample 2" src="https://lh4.ggpht.com/_jG2dN_4T_w4/TQtSpt72NRI/AAAAAAAAAIc/2vFtQ0ETdbU/From%20Sample%202_thumb%5B2%5D.png?imgmax=800" width="402" height="163" /></a></p>  <p><a href="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSqEtK5QI/AAAAAAAAAIg/ukY0phRG_-o/s1600-h/From%20Sample%203%5B3%5D.png"><img title="From Sample 3" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" border="0" alt="From Sample 3" src="https://lh6.ggpht.com/_jG2dN_4T_w4/TQtSqhVsSGI/AAAAAAAAAIk/Cv222atlS18/From%20Sample%203_thumb%5B1%5D.png?imgmax=800" width="402" height="168" /></a></p>  <p>So We can create the cascading dropdown without writing any code in InfoPath designer 2010.&#160; This is possible due to filter support in InfoPath 2010 for browser enabled form.</p>  <p>I hope you will enjoy this.&#160; </p>]]></content:encoded>
    </item>
  </channel>
</rss>