Newest 'asp.net' Questions

Q&A for professional and enthusiast programmers

DayPilot - Gridview not refreshing

I am using Daypilot Calendar. The issue I have is that whenever there is a change, such as EventResize or EventMove on the calender the Gridview should update with the latest values Example ...

How can I generate a random port number in a Visual Studio custom template

I am trying to create a Visual Studio template, based on a default (ASP.NET) web template. However, the default web template is capable of generating an address like http://localhost:5XXXX/ where the ...

WPF Application targetted for .Net Framework 3.5

We are using a WPF application targeted for .Net Framework 3.5, the application does not work with Windows 8 and 10 and it does not work if newer version of .net framework is detected. we always get ...

Pass through authorization service (proxy) for internal OAuth2.0 Authorization Server

We have an OAuth2 Authorization Server built using ASP.Net Identity2 which is not public. We have a website which uses the Resource Owner Password Credentials grant to get a token from the internal ...

referencing fields created in repeater from postback

I've built a form using a repeater and now I want to reference the fields on my click event. I can get to them from inside an item loop For Each item In formRepeater.Items myField = item....

Authentication Sub-Domain Cookie not read by ServiceStack

I am trying to get a user authenticated against one sub-domain "bar.root.com" and be able to access sub-domain 2 "foo.bar.root.com" without needing to log in again. To pull this off, ServiceStack ...

Reading custom config file in WebForms app

I have classes to read in a custom config file, which work in my (sandbox) MVC app, and in a console app. However, it fails to read anything except the top level section when it's run from the web ...

How to acquire HttpStatus Codes in ASP.Net Core?

I'm running through a list of both secure and unsecured domains (both http:// and https://) in an array and wish to return their status codes. How is this possible in ASP.Net Core 1.0? so far, I have ...

printing griedview and page setup for notice letter

I displayed report in griedview and want to allow to print the data in griedview how to do it ? if possible want make it in pdf. Also want to make a notice letter where name,address and date fields ...

ASP.NET MVC video not playing despite loading resource successfully

I am having an issue where I am trying to load a video in my view as follows: <section> <video style="margin-top:30px" width="480" height="204" controls> <source src='@Url....

Passing parameter from ClickOnceApp to Web Service constructor (.NET)

I have a .NET 4.0 Web Service, code as follows [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel....

Why I am not getting error with ref keyword

According to definition, ref keyword must be initialized before passing. while out parameters must be initialized before returning from the function. Below is my snippet. public void TestRef(ref ...

.Net build is failing due to invalid applicationHost.config

Folks, Am trying to run a build using the below command line however there is a prompt everytime which is causing trouble. I have to address this manually and cannot run automated builds. $...

Configure Hangfire for Production in IIS 8

I want to use hangfire in an IIS 8 / OWIN environment, but I am not sure how to set it up. The Hangfire docs use IProcessHostPreloadClient which according to MSFT docs is only avaliable in IIS 7. ...

Sending a message to Lync from C# Asp.net

I have a notification system for my Asp.net application that uses sql-server. Currently, when there is an update on certain tables email alert sent. I am wondering, if there is a way to use Lync ...

Populating Page HTML from Database

I am designing a CMS(Content Management System). I want to populate Page's HTML Markup from database with content also. Just like in Word Press when a user selects a piece of design/Section to add ...

No symbols when attaching debugger to manually launched IISExpress instance

I've got a scenario where I want to launch a locally hosted service via IISExpress through the command line, and then debug it with Visual Studio. The problem comes when I attach a debugger to the ...

Cross domain single sign on between totally separate systems

We are producing an asp.net web forms micro-site that connects to our existing SQL Server database. A client wants users who are logged in at their website, to not have to login to ours. Their ...

How we can change whole website in other language in asp.net mvc

I am new user i want to change my small website into urdu/arabic.dropdown shows multiple languages any one can guide me? This should be done in asp.net MVC website.

Cast System.Web.Security.RolePrincipal

I have a project built with Visual Studio 2008. Im upgrading it to VS 2013 (ASP net forms - Not MVC). One of the areas thats new to me is user authentication. I have a class within this project which ...

VS2015 DB project Schema Compare partial update

I have a pre-existing database with hundreds of tables and procs. A few of the tables have triggers also defined. When I create a brand new project and run a schema compare, all of the items show up (...

ASP.NET MVC route with .asp extension

I need to be able to support an ASP.NET WebApi (v5.2.3.0) route that looks like this: https://example.com/orders/orders.asp It's for a 3rd party device to be able to interact with my system. I've ...

asp.net postbacktrigger in updatepanel don't prevent page reload

In a contentpage have some text field and button when click this button reload the master page actually I want to not reload masterpage but the contentpage......thanks in advanced <asp:...

Should I implement ASP.NET MVC custom authentication via a DelegatingHandler?

I have a client who needs to integrate custom authentication into a MVC website. The token is similar in concept to a JWT, where claims are listed inline, HOWEVER I need to bypass JWT authentication &...

.NET, possible having both Active Directory and third party authentication?

Have an internal web app uses Windows' Active Directory. Now needs to let outside customers authenticated by say Google.com to be able to access this app. Is it possible? If yes, is there any sample ...

How can I use ASP.NET MVC (or Core) to detect and redirect cookieless sessions?

I'm creating a website where security conscious (paranoid) people might block cookies, and even authentication cookies. I'd like to detect this instance, and redirect to a FAQ/Help page that ...

Chrome doesn't understand encoded Content-Disposition filename created by .NET

I get an interesting problem when the filename is long and contains a non-ASCII character. Here is what happens: For this example, I have chosen the filename VeryVeryT=250°...

Using WATIN to Load Html from an external link, after the page grid loads. Working on Local Dev but On Server - Connection was reset error

string myHtml = ""; // Worker Thread var th = new Thread(() => { // Settings Settings.AttachToBrowserTimeOut = 540; Settings.WaitForCompleteTimeOut = 540; Settings.MakeNewIeInstanceVisible = false; ...

How do I resize an image C# in asp.net - has anything changed?

7 years ago, resizing an image in C# in an ASP.NET application looked to be a mined operation. There were three different approaches. System.Drawing was not server safe. WebImage was apparently a ...

Subgrid is not binding in mvc

I am writing webgrid inside webgrid, for binding subgrid I called controller action method but it's getting error like datasource must be bound before this operation can be performed I searched ...

Calendar Year View -

I am looking for a control (UWP or ASP.NET) that gives me a calendar year view (Fiscal year ;-) ) and lets me categorize the days. So I would like to be able to click a day and then choose a color ...

How to export string data to pdf format in .Net Core MVC

How to export string data to pdf format in .Net Core MVC. Please anyone help me for export the data in pdf format in .net core.

I want to get value of selected row of gridview for specific column and use that value for crosspage posting - how to implement this?

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridView1.SelectedRow; string tenderno = row.Cells[1].Text; Response.Redirect("crossPage.aspx?...

Asp.Net MVC 5 Project on IIS, Login failed DOMAIN\MACHINE$ for Sql

I am developing a website with the Asp.net MVC5 template. This website have obviously a database with some informations. This MS-Sql database runs on a remote VM. While coding I tested this site with ...

CloudBlockBlob.DownloadToStream vs DownloadRangeToStream

Trying to use the ASP.NET azure SDK for downloading images from blob storage.. I read in another post that DownloadToStream does break blobs up into smaller pieces and downloads them in parallel in ...

SQL Server does not exist or access denied (For a connection that worked previously)

I apologize in advance for how vague this question is. I had a connection string to SQL Server 2012 on a remote server from my work laptop using Visual Studio 2015 and it worked well for connecting ...

asp.net dropdownlist first selection does not fire SelectedIndexChanged event

I've created a dropdownlist, and tried clicking on the first selection but there was no firing of the SelectedIndexChanged event. However, it worked perfectly fine for the rest of the options in the ...

How can I insert xlsx file into docx by using DocumentFormat.OpenXml library?

In the program, the user selects the files that can be embedded in the docx file. Adding pictures I did. How to add xlsx and pdf (desirable). Used Library: DocumentFormat.OpenXml. So I add images to ...

How can I improve my button which uses a Html.ActionLink inside a styled div

So far I have a div which takes Bootstrap button styling and it has a Html.ActionLink within the div: <div class="btn btn-success"> @Html.ActionLink("Create New", "Create") </div> ...

Web service call generates Soap tag but web service expects Soapenv

I am utilizing a third party web service in my .NET application. While I make a call to the webservice, the request xml contains tag but the webservice actually expects <Soapenv:body> tag. I ...

Retrieve Text From Database and display it as HTML paragraph using ASP.net

I have some text stored in a database and i want to display it as html paragraph, is there a way to do it using asp.net? Mean i want to update the data from back-end it will change the data from ...

How to send or store page timeline info from Inspect function to server side

I am trying to deploy user timing of Google Analytics following the below instruction: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#usertiming I can see all the ...

Repeater Not Retrieving from SQL Server Whilst Inside a Drop-down Div

Below, is a list item on my navbar. When I hover over it, it displays a sub-menu of the different sports. <li class="w3-dropdown-hover"> <a href="Sports.aspx">...

How to prevent link from copied text on website for all pages? [on hold]

when I tried copy some content from our website then the "See more at: https://websitename.com/#sthash.0ZqMHPyZ.dpuf" url appended automatically. How to prevent this?? for ex:-you can copy any ...

Fastest way to check an application compatibility with .net core and compile it for linux

I am looking for a fast solution for this. I have been searching on google and have found some useful links but i am in urgency, Can anyone help me? Here is what i have gone through yet, if you have ...

Why do i need to have create database permissions for asp.net web app?

I am building an ASP.NET, code-first web app. I am using a company owned database, and have crud permissions for tables within one database on this server. I do not believe I have "Create Database" ...

How can find value of itemtemplate without coutrol bind

My grid view data bind Like this:- <asp:TemplateField HeaderText="COMPANY NAME"> <ItemTemplate> <%#DataBinder.Eval(Container.DataItem, "Company_Name")%> </ItemTemplate&...

How do I prevent a web form from being accessed by manually typing the aspx file name into the browser?

I have created a Login page that is only for admins (so there is no need to check if the user is admin or not). The page does the check against a database where the username and password is stored. I ...

How to check modal is open in Razor ASP.net

I have reviewed many solutions most of them are of jQuery .. I dont know how to check modal is open or not ... Actually I want to render the list after modal is open is there any way to do this in ...

Deploying ASPNET core app in IIS inside Docker Container

I have been working with docker for some days and since I am trying the possibilities of docker, recently faced a problem about how to deploy an ASP.NET core app in a webserver inside Docker container....
Translating... 0%