spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » ASP NET » Page 1
Tasks are not go queue from web page
Are you doing any error logging? It could be that a web service call fails every now and then. We are talking about networks and they do fail sometimes... To mitigate this you could consider using Actions in CRM 2013-2015. They are built for these very scenarios. If you indeed are running CRM 2011 (and don't have plans to upgrade) then you could consider making a "Web Task"-entity in which you co

Categories : Asp Net

gracefully detect a User's inability to support a SHA256 SSL Connection from ASP.net
This is only a partial answer for a possible workaround. Considering that Internet Explorer on Windows XP also has another known SSL/TLS limitation, the fact that it doesn't support Server Name Indication (SNI), you might be able to serve distinguish clients based on whether they use the server name extension in their initial Client Hello message. You'd need to upgrade to IIS 8 for SNI support (

Categories : Asp Net

Switching from EF Automatic Migration to Code-First-Migration
Code first migrations - what connection string will it use? Specifying the connectionStringName in the Update-Database / Add-Migration worked properly. Update-Database -projectName Data -connectionStringName MyConnectionString

Categories : Asp Net

How to redirect user to relevant subdomain
You can certainly do it into your global.asax file by implementing your logic in the BeginRequest event. http://msdn.microsoft.com/en-us/library/ms178473.aspx If your logic to redirect to the appropriate subdomain requires some fancy logic, you could also implement it into the default page of your site (ie. Default.aspx page init or load event)

Categories : Asp Net

Using ASP.NET 5 with Visual Studio 2013 Community Edition
ASP.NET 5 (vNext) isn't supported in Visual Studio 2013. If you want to test ASP.NET 5, you should install Visual Studio 2015. Another option is to test ASP.NET 5 on a Mac or Linux machine. I was able to get it working on a Mac without too much hassle, and having Intellisense in Sublime Text was really cool. Or, as Victor Hurdugaci points out, you don't need Visual Studio on Windows at all to ru

Categories : Asp Net

Server Error in '/' Application (only in Firefox)
It's hard to see the exception type because the text is so small on you resized image. Have you tried monitoring the request using Fiddler, or launching FF Dev tools (CTRL+SHIFT+I from FireFox)? Is there anything in that output that could reveal a clue?

Categories : Asp Net

Dotless using different folder
Your problem is that dotless uses the current directory to look for imports even when the initial file is not in the current directory. If you're comfortable working with MSBuild files, you can switch the working directory for the exe call.

Categories : Asp Net

Calculate new Average by using old AverageRating and New Value
If CountRated is the number of times the product is rated, before the new value of RatingValue : AverageRating = (AverageRating * CountRated + RatingValue) / (CountRated + 1); It can be faster than recalculating average from all data, but it may be less accurate with lot of data.

Categories : Asp Net

How to determine modified fields in asp.net mvc?
I have recently encountered with a similar problem while building an API using Web API 2 and EF6. I have an entity with many fields, and I only want to update the fields that are recieved in the json. So instead of using the ASP deserializer and receive the object parsed like so: public IHttpActionResult Update(int id, Product product) { ... } I removed the Product from the function call p

Categories : Asp Net

Data quering from asp.net custom control
In my opinion that appears just fine. You're going to have to connect to some other layer, so the question is, do you need to separate your BusinessService layer from your presentation? The only answers I can think of are if you need to add a layer of security, or if you need to abstract out domain types to make your calls platform independent (like if your business layer is tied to Entity Frame

Categories : Asp Net

asp.net grid view checkbox
Add this: <asp:CheckBox ID="chkApprove" runat="server" Checked='<%# Eval("ViewStatus").ToString().Trim() == "1" ? true : false %>' OnCheckedChanged="chkApprove_CheckChanged"/> And in code behind: protected void chkApprove_CheckChanged(object sender, EventArgs e) { CheckBox cb = (CheckBox)sender; GridView g1 = (GridView)cb.Parent.Parent; foreach (GridVie

Categories : Asp Net

Want DropDownlist value to get stored by ID
Try binding your Department Dropdownlist like Using sqlconn As New SqlConnection(ConfigurationManager.ConnectionStrings("Conn").ConnectionString) If sqlconn.State = ConnectionState.Closed Then sqlconn.Open() End If Dim ds As New DataSet() Dim qry As String = "Select dpt_ID,dpt_name from mst_Dept" Using cmd As New SqlCommand(qry, sqlconn) Dim sda As New SqlDat

Categories : Asp Net

SQL ID error- Insert and Update not working
if you dont have an ID to sent to the procedure. you should set default value to @ID parameter in the procedure: ALTER PROCEDURE Sp_addupdatepages (@Id INT=NULL, @page_title NVARCHAR(100), @page_description NVARCHAR(max), @meta_title NVARCHAR(255),

Categories : Asp Net

Connect Azure database to existing Asp.Net web application
Your question is still quite vague on specifics of what you want to achieve but hopefully this answers it. If not, please provide even more detail on your question. If you just want to see the DB in Visual Studio and interact with it Download the Azure SDK Go to Tools > Connect To Database A side box will open and you can navigation through Azure then to your database. Personally I prefer us

Categories : Asp Net

How authenticate users credentials on page load without login
You need to configure IIS to enable integrated security and disable anonymous logon (that is one reason why you are being prompted for the usernam) Once you have done that, some code like this should give you the username: If System.Web.HttpContext.Current.User.Identity.IsAuthenticated Then Return System.Web.HttpContext.Current.User.Identity.Name Else Return "Unknown" End If

Categories : Asp Net

Syntax error in INSERT INTO statement in asp.net
try like this String q = "insert into login (username, [password]) values (@u, @p)"; cause: password is reserved word Source

Categories : Asp Net

How to keep small part of page uncahced in page out put caching
Since the page is cached, well - the entire page is cached, and nothing in this call will be retreived again from the server until the cache is invalidated. You could solve it by doing an ajax call with javascript on document load that gets the updated value from a REST service (or just simulate a service by returning json formatted string from an aspx page), and then update the date value from j

Categories : Asp Net

ASP.NET report expression gives error
From this thread: For the Matrix : =System.String.Format("{0:00}:{1:00}", System.TimeSpan.FromTicks(Sum(Fields!duurHHMM.Value)).Hours,System.TimeSpan.FromTicks(Sum(Fields!duurHHMM.Value)).Minutes) For the Chart : =System.TimeSpan.FromTicks(Sum(Fields!duurHHMM.Value)).TotalMinutes

Categories : Asp Net

Authenticate a Google user by Code instead of "Consent screen" ASP.net/C#
What you are talking about is called a Service account. Think of a service account as a user, you don't have a log-in and password for it but it does have a drive account. You also cant log into it using the website version of drive. Everything has to go though the API. string[] scopes = new string[] { DriveService.Scope.Drive, DriveService.Scope.DriveFile};

Categories : Asp Net

MVC 4 - pass data via ViewBag to _Layout partial view
What I suggest is to make a base controller class. Inherit all your controllers from it. The code to render the data for the layout, can lie in it's constructor, or some other common function that all your controllers can use as children of this base class. public class BaseController : System.Web.Mvc.Controller { public BaseController() { // This code will run for all your controll

Categories : Asp Net

XML Parsing Error: not well-formed ASP.NET
The file location should give a hint. That's a location on the file system and not being passed through a web server. When you view it using file:// then the browser simply displays the contents. The @Page directive in the first line doesn't conform to XML/XHTML/HTML standards so it throws this error. The browser knows nothing about the @Page or anything else in the page except the bits that are

Categories : Asp Net

asp:HyperLink shows without hyperlink
You can use LinkButton instead: <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">View Report</asp:LinkButton> protected void LinkButton1_Click(object sender, EventArgs e) { string pageurl = "Default.aspx"; Response.Write("<script> window.open( '" + pageurl + "','_blank' ); </script>"); Response.End(); }

Categories : Asp Net

Azure Cache/DataCache style Regions in Redis
For what I understand by your question you need to group your data according to some criteria (user in your case), so that whenever record related to that criteria is changed, all of data related to that record is also invalidated in cache using a single cache api call. You can achieve this in Azure using NCache for Azure, a distributed caching solution for azure by Alachisoft which has a rich se

Categories : Asp Net

Forms Authentication Shared Across Websites
Since you only want to share within the same domain this shouldn't be a problem. machine key matters only if you are going to deal with multiple servers or domains. In your case it's the same domain on the same server, therefore if you set the domain (there is a property in httpcookie) to be "domain.com" (you should not mention any subdomain) in your authentication cookie, I remember that this c

Categories : Asp Net

asp:HyperLink not pass by querystring
What you can do : From the server side : LinkButton2.NavigateUrl="~/SPage.aspx?uid=" +Uri.EscapeDataString(Utils.Encrypt(Uid)); //Utils.encrypt is your encryption function Users will see it , but they won't understand nothing from it. Later , on your page : var myValue = Utils.Descrypt(Uri.UnescapeDataString(request["uid"]));

Categories : Asp Net

Taking over a project
If you have access to the files on the server, you can copy all files (and other related things such as databases) and it should run as-is. If you have none of the code however you won't be able to change much. .aspx files are compiled at runtime so you can change whatever is in them, but logic will not be as easy. .NET code decompiles reasonably nicely if it hasn't been obfuscated so you might

Categories : Asp Net

Asp fileupload ERR_FILE_NOT_FOUND on photo delete
it could be handle if we set onclickclient event on file upload button as <asp:Button runat="server" OnClientClick="return handleUploading();" ID="UploadButton" Text="Upload" OnClick="UploadButton_Click" /> here is javascript function function handleUploading() { var fileUpload = $('#contRMSMaster_FileUploadControl'); if (fileUpload.val() ==

Categories : Asp Net

Asp.net mvc authenticate with google plus
You could validate user email when user registers and reject to register if the email is not the one you want. You can do so in AccountController.Register action by validating the specified email, and not creating user if email does not come from your domain. Google OAuth provider returns user email, if you ask it to do it (add scope "email" to GoogleOAuth2AuthenticationOptions in Startup.Auth)

Categories : Asp Net

@html.actionlink renders wrong url
By default, it creates a url to the current controller (which is Home in your case). If you want to modify it, you can use another of this function signatures: Html.ActionLink("Domeinen", "Domain", "DomainController")

Categories : Asp Net

How to display a really long form in a user-friendly way?
Accordion Sample: <ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeader" ContentCssClass="accordionContent" FadeTransitions="true" FramesPerSecond="40" TransitionDuration="250" A

Categories : Asp Net

Dropdownlist binded data code behind shows blank rows
Did you mean to write: Dim comd As New OleDbCommand("SELECT ID1 FROM [Tak1] Where Section_='" + sectxt.Text + "' and status_='Open' and ID1<>""""", con1) or, alternatively (and preferably), Dim comd As New OleDbCommand("SELECT ID1 FROM [Tak1] Where Section_='" + sectxt.Text + "' and status_='Open' and ID1<>''", con1) (You may have forgotten to add all the quotes you wanted, since

Categories : Asp Net

how to detect kindle user agent
If you look at the Amazon Documentation, you can look for the specific user agent that you're trying to detect. So for example, here's the Kindle Fire: Mozilla/5.0 (Linux; U; Android android-version; locale; product-model Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version This means you could detect "Silk"

Categories : Asp Net

Asp.net mvc calculate distance between two addresses
Taken from: http://www.geodatasource.com/developers/c-sharp //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::: ::: //::: This routine calculates the distance between two points (given the ::: //::: latitude/longitude of those points). It is being used to calculate ::: //::: the

Categories : Asp Net

Signalr CORS issue
You can look at this snippet from here https://github.com/louislewis2/AngularJSAuthentication/blob/master/AngularJSAuthentication.API/Startup.cs and see if it helps you out. public void Configuration(IAppBuilder app) { HttpConfiguration config = new HttpConfiguration(); ConfigureOAuth(app); app.Map("/signalr", map => { // Setup the CORS middlew

Categories : Asp Net

ASP.NET Website Project auto deploy with TFS 2013 build
You need to upgrade your Web Site to a Web Application in order for any of this to be automatic. Its a fairly simple procedure and even on sites with thousands of pages I have completed the migration in only a few days of one persons time without impacting other devs. Web Site functionality has been feature complete for over 10 years. While it still existing in the product for back-compat I woul

Categories : Asp Net

In ASP.NET I Need to update a control, run a task, then update control again
Classic ASP really confuses things, IMO. ASP.NET MVC remains truer to the actual HTTP lifecycle. What actually happens with HTTP is that the client (browser) sends an HTTP request to the server, which then constructs a single HTTP response to send back. In the case of a web page request, that HTTP response includes all the HTML. So, all the work your handler does on the server side "constructing"

Categories : Asp Net

Using ASP.Net Identity 2 cookie in forms authentication
The cookie contains authentication ticket. The format of this ticket is different for cookie authentication middleware vs forms authentication. It is not possible to make FAM read the cookie created by the cookie authentication middleware. That said, you can write your own HTTP module, similar to FAM to read the cookie created by the cookie authentication middleware, like this. public class MyHtt

Categories : Asp Net

Breezejs Web api OData method not allowed
I found my problem. I was using OData v4. Apparently datajs does not support OData v4 yet. Adding the following code in the WebApiConfig smoothed things out even further: var cors = new EnableCorsAttribute("*", "*", "*", "DataServiceVersion, MaxDataServiceVersion"); config.EnableCors(cors);

Categories : Asp Net

How to share with specify Title,image,Details on facebook in MVC4 asp.net
Even you set from the link Facebook needs some open graph/meta tags for that. Also check your url with Facebook url linter to make sure everything is ok. https://developers.facebook.com/tools/debug

Categories : Asp Net


Recently Add
No parameterless constructor defined for type
Tasks are not go queue from web page
gracefully detect a User's inability to support a SHA256 SSL Connection from ASP.net
Switching from EF Automatic Migration to Code-First-Migration
How to redirect user to relevant subdomain
Using ASP.NET 5 with Visual Studio 2013 Community Edition
Server Error in '/' Application (only in Firefox)
Dotless using different folder
Calculate new Average by using old AverageRating and New Value
How to determine modified fields in asp.net mvc?
Data quering from asp.net custom control
asp.net grid view checkbox
Want DropDownlist value to get stored by ID
SQL ID error- Insert and Update not working
Connect Azure database to existing Asp.Net web application
How authenticate users credentials on page load without login
Syntax error in INSERT INTO statement in asp.net
How to keep small part of page uncahced in page out put caching
ASP.NET report expression gives error
Authenticate a Google user by Code instead of "Consent screen" ASP.net/C#
MVC 4 - pass data via ViewBag to _Layout partial view
XML Parsing Error: not well-formed ASP.NET
asp:HyperLink shows without hyperlink
Azure Cache/DataCache style Regions in Redis
Forms Authentication Shared Across Websites
asp:HyperLink not pass by querystring
Taking over a project
Asp fileupload ERR_FILE_NOT_FOUND on photo delete
Asp.net mvc authenticate with google plus
@html.actionlink renders wrong url
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.