ASP.NET

124K

Solutions

28K

Contributors

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

Share tech news, updates, or what's on your mind.

Sign up to Post

I look after a website that is hosted on EUKHost. I do not have access to the server, my only level of access is via a Plesk web host edition portal.

Up to yesterday the site was working fine, but today I am getting the following error:

This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.


I have already done some research, and found that this is normally fixed by adding the following into web.config:

<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>

However this was already in the <system.web> section of the web.config file.

I have also tried changing

<pages>

to

<pages enableEventValidation="false" viewStateEncryptionMode="Never">

but this didn't help either.

Many solutions involve changing a registry key to turn the checking off, but this obviously isn't an option for this site, as I don't have access to the underlying server.


Any ideas?
0
Cloud Class® Course: Microsoft Exchange Server
LVL 12
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

I use the following code to log a user of my ASP.net/SQL web app in automatically as the page loads.
It does this by using cookies that remembers the username and password.

I have done this on every page of the site but would rather have it that if the user logs in on any page that
they can come back to any page and the cookies will remember their credentials

Is there a way to have the cookies remember the details no matter which page they come back to after logging in on just one page?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            If Not IsPostBack Then

                If ((Not (Request.Cookies("xUserName")) Is Nothing) AndAlso (Not (Request.Cookies("xPassword")) Is Nothing)) Then

                    'txtPassword.Attributes("value") = Request.Cookies("Password").Value
                    Me.txtUsername.Text = Request.Cookies("xUserName").Value
                    Me.txtPassword.Text = Request.Cookies("xPassword").Value
                    Call LogIn(False)

                End If

                Me.DropDownList_Number_Days.Text = 365
            End If
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try
    End Sub



    Sub LogIn(ByVal blnManualLogin As Boolean)

        Dim cs As String = ConfigurationManager.ConnectionStrings("PSQL").ConnectionString

        Dim cn As New SqlConnection(cs)


        Dim sSQL As String
        sSQL = "Select * From 

Open in new window

0
Hi,

When editing particular row in gridview based on my filter from searching fropdown,

gridview will not highlight the selected row to update. instead it will move the very first row by defualt to edit.

what is the problem..
0
Hi

In my ASP.net web app I need to email a pdf document containing information about a purchase order.
How would I build a neatly formatted pdf document using VB.net?
0
How can i easy and securely post data entered in a desktop application (developed in visual studio) to a website (also developed with MVC) for reporting to remote user.

I have developed a desktop application and i want user to periodically post data to a website where others users can see reports.

Sincerely i don't know how to go about this.

Thank you

ANTHONY
0
I have set up a bamboo task to build a ASP.NET application. It uses MSbuild executable to build the project. In the options, I pass in /p:Configuration=Release.
The project builds successfully but the bin folder has files with pdb extensions, which I believe are generated when project is built in debug mode.
How do i build the project in release configuration?
0
Hi guys,
I am using asp.net mvc 5 and I have one controller that initiate the first page.
something like this:
http://localhost:60219/documentviewer/index.

Now I am calling a service from serviceConfig.json. which look like this:
{
   "_comment_": "This file is used if an external application needs to change the values the client application will use to communicate with the service.",

   "licenseDirectory": null,

   "serviceHost": "http://localhost:60219/",
   "servicePath": "",
   "serviceApiPath": "api/",

   "app3": "",
   "app4": "",

   "GoogleDriveLoad_ClientID": "",
   "GoogleDriveLoad_APIKey": ""
}

Open in new window


when I call this json file I am trying to get this link
http://localhost:60219/api/test, but instead I am getting - http://localhost:60219/documentviewer/index/api/test

my question is: how can I get read of the controller and view from the first page and return just -http://localhost:60219/api/test


Thank you.
0
I have the google c# api code and it works fine.But I want to get
child node : photos {height and width}.
rating
open now
weekday text
viewport

Can you help me what I need to do with the codes below? Thank

reference: https://developers.google.com/places/web-service/search


       
protected void Page_Load(object sender, EventArgs e)
        {
             WebClient wc = new WebClient();
            string jsonStr = wc.DownloadString("https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=37.753,-122.443&radius=10000&type=rv_park&key=AIzaSyCietasdfasdfasdfasdfxzD65Uc19X6DgrJFumdi-nCZYSHjg");
            GooglePlacesResponse gpr = (GooglePlacesResponse)JsonConvert.DeserializeObject<GooglePlacesResponse>(jsonStr);
            Response.Write(gpr.status + "<br><br>");
            foreach (results r in gpr.results)
                {
                
                Response.Write
                    (r.name + " "  + 
                     r.geometry.location.lat + " " + 
                     r.geometry.location.lng + " " +
                     r.reference + " " +
                     r.vicinity  + " " +                         
                     "<br><br>");
            }

         } 
        public class GooglePlacesResponse
        {
            public string status { get; set; }
            public results[] results { get; set; }
        }
        public class results
        {
            public geometry geometry { get; set; }
            

Open in new window

0
Is there a way to recover the password on a Word VBA Project using programming code? My file format is .dot. A Lot of recovery tools available in online but need to pay for those products I'm a student not able to pay so I need to recover or view my VBA project .dot file forgot password using code. Is it possible in code using .net programming or VBA code or any other programming codes?
0
Trying to show alert error message from my controller.  ASP.NET Core

Here is the code from my controller

[HttpPost]
        public async Task<OkObjectResult> GetSearchCases(CancellationToken token, int search)
        {

            using (CancellationTokenSource cts = CancellationTokenSource.CreateLinkedTokenSource(_hostStopping, token))
            {
                MyCaseViewModel mySearch = new MyCaseViewModel();
                var mySearchCases = _mapper.Map<List<MyCaseViewModel>>(await _myCasesService.GetSearchCasesAsync(cts.Token, search));
                if (mySearchCases.Count == 0)
                {
                    TempData["message"] = "Error";
                    return Ok(View());
                }
                else
                { return Ok(mySearchCases); }

            }

        }

Open in new window


As you can see from the above snippet I want to go back to the view if the count == 0 and show the error message. But I am not getting redirected to the view.

Here is code from my view

@{
    ViewData["Title"] = "Home Page";
}
@{
    if (TempData["message"] != null)
    {
        <script type="text/javascript">
        alert(@Html.Raw((TempData["message"])));
        </script>
    }

}
@section Scripts {
    <script src="~/js/my-cases.js" asp-append-version="true"></script>
    <script src="~/js/searchCases.js" asp-append-version="true"></script>
}
<h1>My Cases</h1>
@*<button id="take-next-case" class="btn btn-primary">Take Next Case</button>*@
<div class="row">
    <div id="case-status" class="col-4">
        <button id="take-next-case" class="btn btn-primary">Take Next Case</button>
    </div>
    <div class="col-4"></div>

    <div class="col-4">
        @*@Html.TextBox("AccountNumber", null, new { autocomplete = "off", maxlength = 20 })*@
        <button id="mainSearch" class="btn btn-primary">Search</button>
        <span class="fa fa-search"></span>
        <input id="search-text-box" type="text" placeholder="Search">
        <span id="errMsgAccNumber"></span>

    </div>

</div>
<div id="my-cases"></div>

Open in new window

0
Cloud Class® Course: Certified Penetration Testing
LVL 12
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

We are looking to moving from our current hosting provider because we've been having problems for months that aren't getting resolved.

What is everyone doing for hosting SQL SERVER Database (2015) and ASP.NET IIS technologies?

With load balancing (3 servers a day) and load balancing type technology on SQL as well. And also a hardware Firewall.

We would also be interested in hiring someone as a consultant to make the move as seamless as possible.

We are using Rackspace now.

Thanks!
0
Hi there,

I’m working for a prototype that integrate Kerberos, ASP.NET , nhibernate  with an Oracle Database backend.  

On the  IIS web server itself, I was able to simply use sqlplus /@myoracle_server to login without a password  to access oracle .   I also tried a console app that use nhibernate , put  and it works perfectly.

However, when I tried to use it in an web application (ASP.NET )  I am constantly having a credential error.  I think it is the classic “Double Hop” issue but most online tutorial refers to SQL Server but not Oracle.

The connection string I use is “Data Source=MY_DEV;Integrated Security=true”

I used the Kerberos Configuration Manager for IIS server tool to setup my IIS server  https://blogs.msdn.microsoft.com/surajdixit/2018/02/07/kerberos-configuration-manager-for-internet-information-services-server/   and
Everything seems to be configured correctly but when I run the web app with querying oracle db, I keep getting

ORA-12638: Credential retrieval failed   (Hitting the web app on the IIS server)  OR
ORA-12641: Authentication service failed to initialize (Hitting the web app from the another workstation.)


I would be really appreciated with some help on this .
0
Hi Experts,

When the following function runs, the windows event viewer is logging the attached error.  Any help is greatly appriciated!  

public void EndCheckForEisEmails(IAsyncResult result) {
                  var response = ((ServiceResponsePaged<EisEmail>)(((ChannelInvokeAsyncResult)result).Result));
                  if (response.Status == ResponseStatus.Success) {
                        var baseUrl = (string) result.AsyncState;
                        //We have to hit our own api to get a valid request context so that we can trigger the rule. Currently we have no request context
                var apiUrl = string.Format("{0}/api/siteevent/SendEisEmails", baseUrl);

Thanks in advance.
                        var emails = response.PagedData;
                        var jsonFormatter = new JsonMediaTypeFormatter();
                        var client = new HttpClient();
                        //var responseMessage = client.GetAsync("RecyclingClaimsProcessed");
                        const int numberOfItemsToprocess = 20;
                int pages = (emails.Count() / numberOfItemsToprocess) + 1;
                for (var i = 0; i < pages; i++) {
                    var responseMessage =
                        client.PostAsync(apiUrl, emails.Skip(i*numberOfItemsToprocess).Take(numberOfItemsToprocess).ToArray(),
                            jsonFormatter).Result;
                              
                    //This forces a pause, this is by design, we don't want to create too many requests.
                    if (!responseMessage.IsSuccessStatusCode) {
                        Logger.Error("Error while trying to post to …
0
The trust relationship between the primary domain and the trusted domain failed in Windows 2003 and Windows 2008 servers while launching web application.

The trust relationship between the primary domain and the trusted domain failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: The trust relationship between the primary domain and the trusted domain failed.


Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SystemException: The trust relationship between the primary domain and the trusted domain failed.
]
   System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) +1143
   System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) +46
   System.Security.Principal.WindowsPrincipal.IsInRole(String role) +133
   System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +256
   System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +418
   …
0
I am needing to filter down a data grid view depending on information inside of a textbox.    Here is the sql code I have and the textbox name is txtcomputername.


selectCommand="Select * from _gc_review_shop where usr_id = txtcomputername.text

this isn't working and I can't find a solution that will work..
0
Hi all

I made an Visual Studio MVC webpage, which will be used to IT Equipment rental management.

I want a specific text input field "Name" to auto-complete or auto search for user firstname and lastname from Active Directory.

For exampel : if i wrote "Jo" then the text input field will show all names starts with "Jo" where we can pick the right name and then use this on "Name" text input field.

I have search on the web about how to achieve this, but couldn't find any great article about this.

If i want to achieve this, what is the best way to do it?

The site is on our intranet network, its inside our organization.

Regards

Erneeraq Fleischer
0
i  am put Crystal Report Selection Formula  in Report Viewer  ASP.NET  but show error in report


Error:-
"Logon failed. Error in File GDM_Summary_Acc 4876_5784_{94B465AA-E059-4907-BB38-CB4DB4F8BDB8}.rpt: Unable to connect: incorrect log on parameters."

CrystalReportViewer1.SelectionFormula = "{ABC.Group_Name} = '" + G_Name + "' AND {ABC.GM_Date} >= Date(#" + newfromdate + "#)  And {ABC.GM_Date} <=Date(#" + newtodate + "#)";

Open in new window


and Remove this code open report with All Data....

Please Help me...
0
Hi

Can you help me ask the difference between implementation class at domain class?
0
I have a databound grideview where I want to color-code the cells in my aspx.vb back end, based on criteria... I started with:

If IsDBNull(DataBinder.Eval(e.Row.DataItem, "SwitchPort1")) = True Then
            e.Row.Cells(3).ForeColor = Drawing.Color.Black

Else
            e.Row.Cells(3).BackColor = Drawing.Color.Green

End If

***

This worked, so then I decided to add some ElseIf's to it and now have it look at the difference between NullOrEmpty, but cannot get the syntax right. There are several examples, but for whatever reason, I am not getting past the first "If", nothing else is being evaluated. I test the database values to force a change in the cell color, and cannot make the cells do anything but White with Black Text (if db is null) OR Green Background (Else). Can anyone help me figure out what I am doing wrong? "Guest" is a specific value, for which I want to search, and if present - a specific color.

If (e.Row.RowType <> DataControlRowType.DataRow) Then
            Exit Sub
        End If
        If IsDBNull(DataBinder.Eval(e.Row.DataItem, "SwitchPort1")) = True Then
            e.Row.Cells(3).ForeColor = Drawing.Color.Black
        ElseIf Len(DataBinder.Eval(e.Row.DataItem, "SwitchPort1")) = 0 Then
            e.Row.Cells(3).BackColor = Drawing.Color.Black
        ElseIf DataBinder.Eval(e.Row.DataItem, "SwitchPort1") = "" Then
            e.Row.Cells(3).BackColor = Drawing.Color.Blue
        ElseIf DataBinder.Eval(e.Row.DataItem, …
0
Get your problem seen by more experts
LVL 12
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Am I having a problem with bootstrap multiselect.  I am losing the checkboxes on display by way of
on click which opens the multiselect items. Ctrl and click will select the items but the checkboxes have
disappeared alone with the make selection button which appears before the items to select from in the list.  I would also
like to combine text fields in my source prior to databind.  See Attached. My code is below

When asp button is clicked,  the link box associated button is made visible
<div>

<asp:ListBox ID="ListBox1" runat="server" Height="240px" SelectionMode="Multiple" Width="400px" BackColor="#CCFFFF" Visible="false" Rows="400" AutoPostBack="False"></asp:ListBox>

<asp:Button ID="Button1" runat="server" Text="Submit" Visible="false" Enabled="false" CausesValidation="false"/>

<asp:Label ID="label1" runat="server" Text="<< See Selections" Visible="false" Enabled="true"/>

</div>

<script type="text/javascript">

$(function () {

$('#ListBox1').multiselect({

includeselectAllOptions: true

})

})

</script>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css" type="text/css" />

<script type="text/javascript" …
0
ASP.NET,  C#
I have a link button in a repeater:
 <th class="auto-style7">
                            <br /><br />
                          <asp:LinkButton ID="lnkreq_policy" runat="server" Text="Policy No" ForeColor="gray" OnClick="lnkreq_policy_click" >
                         
                       </asp:LinkButton>
                            </th>
to sort by this column, code behind:
protected void lnkreq_policy_click(object sender, EventArgs e)
        {
            ls_sort = "policy";
         
            f_sorting(ls_sort);
           

        }
how to change a link button text to: "asc Policy_no"
0
Hi,

I need to write this code in global.asa. GetLastDateandTime is working fine. I need to put that in the session. If user is present then we get the data from the database. This function is working fine. If user is not present then we are using update function. My update function is not working. Page is down. I am not sure how to fix the update function.

Sub S[b]ession_OnStart[/b]

Dim objConn, objRs, strConn

Set objRs = Server.CreateObject("ADODB.Recordset")

Set objConn = Server.CreateObject("ADODB.Connection")                                                                                     

             

strConn = "test;"

 

objConn.Open strConn

dim strUser

strUser = request.servervariables("logon_user")

dim strDateAndTime = Now()       

If (strUser <> "" ) then

    Session("LastDateTime") = GetLastDateandTime(strUser, objRs,objConn)

else
[b]
   UpdateLastDateAndTime(strUser, strDateAndTime, objRs,objConn);[/b]

End If

 

Set objRs = Nothing

Set objConn = Nothing

End If

 

End Sub

 

 

Function GetLastDateandTime( ByVal strUser, ByRef objRs, ByRef objConn)

'--------------------------------------------------------------------------

'-------------------------------------------------------------------------

    Dim cmd

             

       Set cmd = Server.CreateObject("ADODB.Command")                            

       Set cmd.ActiveConnection = objConn

 

       cmd.CommandText = "usp_GetLastDateandTime"

       cmd.CommandType

Open in new window

0
I am working on a asp.net web application(VS2008)
I need to print barcode label.
I created a web form with a label control and other fields that i need on the label. I set the font on the label to barcode font(IDAutomationHC39M). This field has a number which has to appear as a barcode on the page and then gets printed to a label.
The number appears as a Barcode on the page and i was able to print the barcode on the label.
I deployed this application on server.
After deployment to server, barcode font does not show up on the page. It appears as a number. This Barcode font appears on a PC which is my development PC.
This does not show up on other PC's.
I made sure the barcode font is available on all the PC's. I installed it on the server as well as the client PC's. Still, barcode does not show up.
What could be the reason, barcode is not showing up after deployment?

Thanks in advance
0
Dreamweaver cc 2017 did not support database connection using asp.net .
What is the workaround if I have Microsoft SQL database server  and want to have database connection under Dreamweaver cc 2017 -2018?
Want to see the database tables in the dreamweaver panel as in previous Dreamweaver CS version.
I saw php creation is available in Dreamweaver 2017/2018, can it be used to connect to Microsoft SQL server .  My web server is running on IIS 8 or 10.
0
Hi,

I am getting pre-flight error. Help me solving it. I am making xhr call using jquery.
Please help me solving it.

My Code is below:

var jqxhr = $.ajax({
    url: "https://staging-www.otherdomain.com/service/geo",
    type: "GET",
    async: false,
    crossDomain: true,
    dataType: 'json',
    headers: {
        'X-Alt-Referer': 'sit.mydomain.com',
        'Access-Control-Allow-Origin': '*',
        'Access-Control-Allow-Methods': 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
        'Access-Control-Allow-Headers': 'Origin,X-Requested-With, Content-Type,Accept, Authorization, X-Custom-Header',
        'Access-Control-Allow-Credentials': 'true'
    }
                			
});
jqxhr.done(function (data) {
});

Open in new window


Error is below:
Failed to load https://staging-www.otherdomain.com/service/geo: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://sit.mydomain.com' is therefore not allowed access.

Open in new window

0

ASP.NET

124K

Solutions

28K

Contributors

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications