Questions tagged [asp.net]

ASP.NET is a Microsoft web application development framework that allows programmers to build dynamic web sites, web applications and web services. It is useful to use this tag in conjunction with the project type tag e.g. [asp.net-mvc], [asp.net-webforms], or [asp.net-web-api]. Do NOT use this tag ...

0
votes
0answers
2 views

Null reference exception when setting Masterpage label text in content page visual basic asp.net

I am trying to set label text which is in my navbar. This navbar is in my masterpage and I am using Master.nameoflabel to try and set the label's text in my content page. When I try and set the text ...
0
votes
0answers
3 views

how can i include quantity reserved in cart for customers who shopped online and the product has not come out of stock

I tried to put quantity reserve code in my cart to indicate the product sold online but not yet delivered so it may alert the store users of the product already purchased so they wont sell it again ...
0
votes
1answer
17 views

How to get data from Select tag and Insert into Input tag using ASP.NET

Right now I have a Select Tag retrieving all the Title of the documents from the Database: string QueryString = "SELECT TITLE FROM DOC"; SqlConnection myconnection = new SqlConnection(...
0
votes
2answers
25 views

Make Button Ignore ENTER key pressed c#

im building a page using ASP.NET, however, the first element of my page is a Button and there are other elements below it, however, if the client types something and it shows a confirmation box, and ...
0
votes
0answers
6 views

ASP.NET - Validate Excel File Content

I have a page with a file input where the user is supposed to upload an excel file to insert a large amount of records to a specific table. I found this Javascript code to help validate if the ...
1
vote
0answers
11 views

How to instantiate method of a factorymethod pattern and and use that method in different classes?

This is my BrowserRunnerFactory.cs where I have defined to choose chrome and Firefox browser: public class BrowserRunnerFactory { public static IBrowserInterface InitiateBrowser(BrowserType ...
0
votes
0answers
12 views

ASP.NET Core 2.1 Referring to ApplicationDbContext from Class Library

I have these 2 projects App.ClassLibrary and App.Data I followed this tutorial https://garywoodfine.com/using-ef-core-in-a-separate-class-library-project/ to move my migrations and models to App....
0
votes
0answers
6 views

ReflectionTypeLoadException when trying to run the project despite being able to rebuild solution

Trying to set up my project Already installed the package RIAServices version 3.1 (the one that I need). No matter what I do I always get this error. An exception of type 'System.Reflection....
0
votes
1answer
15 views

ASP.NET Core using UserManager or Entity Framework to validate extended form field

I've followed the procedure to scaffold the Razor Class Library as per: Scaffold Identity in ASP.NET Core projects I've also extended my model to include a property called Office365DomainName: [...
0
votes
0answers
5 views

Rewrite query url from adwords

I am looking for a way to rewrite the querystring from adwords in IIS. The reason is my site reports and error a potential dangerous requiest with the & sign. Im getting this &gclid=...
0
votes
1answer
14 views

Entity Framework performance on first access

Were using Entity Framework 6.1.3 on a modular ASP.Net application. When an entity like a 'sales order' is created, this imply the initialization of several modules DbContexts. Typically the first '...
0
votes
0answers
5 views

Why expired property of asp.net FormsAuthenticationTicket is true before the FormsAuthenticationTicket reaches the expiration date?

I set a encrypted httpcookie by FormsAuthentication. But later when I read the Expired property of FormsAuthenticationTicket always gets true even before the expiration date is reached. if (Request....
-2
votes
0answers
18 views

can we autlogin to linkedin using asp.net or javascript?

can we autlogin to linkedin website using asp.net or javascript if we have username and passward available ?
0
votes
0answers
8 views

Scraping ASP.net website using Scrapy login failure

I'm using Scrapy to scrape data from a site that uses ASP.NET. When I’m not logged in, I can scrape all data that is freely available. However, for proprietary material I need to log in. When I call ...
1
vote
1answer
11 views

What is the difference between UseHttpsRedirection and UseHsts

I don't quite get the difference between UseHsts and UseHttpsRedirection in the configure section of the startup file in .net core. Could anyone explain?
0
votes
1answer
15 views

Dynamic assigning of regex pattern

Below Code works fine, If i'm hardcoding pattern in code, if i fetch this pattern from database then it doesnt work. Can anyone advise what im doing wrong //This line works string ...
0
votes
0answers
4 views

Type X exists in elements c:\Windows\…\Temporary ASP.NET Files\root\path1\xxx.dll and c:\Windows\…\Temporary ASP.NET Files\root\path2\yyy.dll

During solve of one task I needed to change a one namespace. I commited that and everybody were happy. But a while moment later I had to rollback a new namespace and back to old namespace. This was ...
-1
votes
0answers
25 views

Postasync json with array in C# [duplicate]

I am trying to post the following json data which works fine in soapui/postman { "Subject": "Testing Emailer API", "ToRecipients": [ "[email protected]" ], "CcRecipients": [], ...
0
votes
0answers
11 views

Visual Studio Add Reference 4.5 dll

I'm wanting to reference System.IdentityModel.Tokens.JwtSecurityTokenHandler which as I understand it is available in .NET 4.5 My application in targeting 4.5, but when I go to add a reference to the ...
0
votes
1answer
23 views

Run ajax function inside an onsubmit in webform

I'm running a ajax function inside an onsubmit action in the webform, but the function is not pointing to the page and to the server side function, I would like to know what I'm doing wrong. The ...
0
votes
0answers
5 views

Response.Filter vs dynamic compression (IIS 7.5+)

In the project we needed to modify the response that is generated by the ASP.NET pages/web-services/doesn't-matter-what. If you search for the best approach to do this, it's to create a HttpModule and ...
0
votes
0answers
20 views

OnCheckedChanged event returns Check Box always as unchecked

I am trying to work in a VB project, but since is my first experience in VB i am having some kind of difficulties. I a have a check Box and a text box. I want that if the user checks the check box ...
0
votes
2answers
55 views

Asp.Net MVC 5 route not getting hit

I have this in my RouteConfig: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", ...
0
votes
0answers
8 views

Creating TreeView based on dynamic data using ASPxTreeList

I am trying to create an ASPxTreeList data source based on dynamic data, but the logic is not well formed. Below code is returning index out of bound error. Any Suggestions on below code to achieve ...
0
votes
0answers
5 views

Xamarin forms UI design Ipad and Iphone Size

Is it possible to develop an application in Xamarin forms that its UI will work for both an Iphone screen size and an Ipad screen size?
0
votes
0answers
21 views

how to get JSON specific value that wil get from the office 365 login

how will I get the specific value from the JSON data? this is the Microsoft office 365 login code, this code was provided by the Microsoft this is perfect but now I will need to be logged in person ...
0
votes
1answer
33 views

Fix background div in asp.net

I have a relatively simple issue that I am trying to resolve. I am trying to fix a background div (<div class="main-background">) containing an image on the page. It appears in Design View in ...
0
votes
0answers
9 views

No request in process still my current request Stalled for 1.52s in network in asp.net PostBack?

asp.net Postback request always stalled for 1.52s in chrome(542ms in firefox) while no request in process. I working in asp.net project and there I am using update panel.In update panel I have ...
0
votes
1answer
8 views

In JMeter, Getting “Object moved here” response for login post request while performing Load test in Asp.net Web app

I have performed Load testing in Asp.net application using JMeter. While login, am getting "Object Moved Here" message as response. In View result tree, I found Login main sampler displaying with two ...
-1
votes
1answer
30 views

Unable to create database when hosting website on IIS Server. Locally it's working

I'm unable to create a database when hosting a website on IIS Server. Locally it's working. I just want to execute this procedure via a URL. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE ...
0
votes
0answers
7 views

System.AccessViolationException - crashing app pool

We've got an application which has been running fine, but recently it's app pool has been randomly crashing. No useful information is in the Event Log. I used the Debug Diagnostic Tool to try and ...
0
votes
1answer
19 views

How to read X509 Signing Certificate content from string in .net?

I have X509 Signing Certificate inside of a string like: var signingCertificate = -----BEGIN CERTIFICATE-----\r\nMIICTjCCAbegAw.........-----END CERTIFICATE----- Now I want to read the content of ...
1
vote
0answers
39 views

ASP.NET login does not redirect just logged user properly in Firefox and IE, but works with Chrome

I have ASP.NET application, which is perfectly works on development environment. Login works on Firefox, IE and Chrome. Requests in Firefox in development env looks like: POST Request: POST /...
1
vote
1answer
28 views

Filtering on asp gridview headers using dropdowns on multiple columns

So I tried to added multiple filters for the gridview and I populated the dropdowns with the distinct datas of the column, but it gives me an exception, System.ArgumentException: Parameter 'siteValue'...
1
vote
0answers
28 views

Getting a request message with a content type x-www-form-urlencoded in a form of JSON using C# for webhooks

I have a problem getting a a request message I am getting the data that I need with a content type x-www-form-urlencoded but in a form of JSON(see image). I use Ngrok for simulating the passing of ...
0
votes
0answers
31 views

How can i do a validation for ever field on my form

I have a form with a lot of fields so i want the user cant write on second field if user didnt into data on the first field. The fields are not a combobox or list, the fields are fields text all ...
0
votes
2answers
39 views

asp.net core 2.1 target .Net Framework and run on IIS without hosting bundle

I have a .NET Core 2.1 application with target framework .Net Framework 4.6.1. I would like to host it on IIS but I don't want to install .net core hosting bundle. Is it possible to run this app on ...
1
vote
0answers
13 views

Does C# MemoryCache persist over IIS Application Pool Idle Timeout

As per question, if I set a MemoryCache with CacheItemPolicy expiration date to be 1 day, does it survive the Application Pool Idle Timeout of 20 minutes (provided the application pool itself is not ...
0
votes
0answers
10 views

ASP.NET Role Based Security in Nested Folder

Below is my site structure in web application: Root/MyApp/ Root/MyApp/Master/ Root/MyApp/Sale/ There could be number of pages in all three above folders. I Applied below web.config files in all ...
1
vote
0answers
33 views

Modify IList Query Statement

I have the following statement, and I want to modify it to not select all tables. Exclude 2 columns customerItemNo and manufacturerItemNo in the if, and Exclude 2 columns customerItemNoAppend and ...
1
vote
0answers
30 views

Get the ranks of a url given a query (without using Google Search API)?

I want to be able to get the ranks of a url in the top 100 google search results for a given query without using the Google Search API. The function prototype is something like this: public List<...
-3
votes
0answers
30 views

How to add a table in a bookmark location in word using C# [on hold]

Kindly suggest me any free solution for adding a table in word document using c#, I have tried multiple solution's it is creating new doc only with table. looking for modifying a document. Any help ...
-3
votes
0answers
42 views

What is the best way to schedule a method in asp.net web application? [on hold]

I have an asp.net web application server side and I have a method that inserts data to the database. I would like to schedule that method once a day and I wonder what is the best way. (my application ...
2
votes
0answers
36 views

How to add all the values in the column and display the added values in the table footer

I am using iTextsharp for generating pdf report. Here I am displaying all the values of the table. Here I need to add all the values in the particular column and display that total value in the footer....
1
vote
0answers
37 views

ASP.NET Cannot find column

I met the error of Cannot find column CustomerItemNoAppend. when I clicked on my search button. Condition: If user is not internal, hide 2 columns. My current query did not involve the column ...
0
votes
1answer
39 views

DI multiple implementation on single interface

I have multiple concrete implementations on a single interface. I have registered that in to ASP.NET core DI as below services.AddTransient<EmailService>(); services.AddTransient<SmsService&...
1
vote
1answer
17 views

Bootstrap Template: Using the template for all the views

I'm trying to add the Gentelella template to my ASP.NET Core project. The main problem is that the content of my current pages (any index page) is not merged with the template: Expected Value: ...
2
votes
1answer
16 views

Bootstrap Template in ASP.NET: Blank spaces around the template

I'm adding Gentelella template to my project. The steps followed so far are: Steps: Add the template via bower Edit the _Layout.cshtml: The info from the main page of the template (head and body) ...
1
vote
0answers
31 views

How to fire click event of image button in datagridview in asp?

I am trying to use image button in datagridview with asp. I have a dataset with some attachment file. When datagridview is loading, check attachment files and add a imagebutton to download that files. ...
0
votes
0answers
14 views

HttpContext.SignIn sets User only in one Controller

I need to implement authorization with users from domain name. So I have a controller: public class UserController : Controller { [Authorize] public IActionResult LoginCheck() { ...