Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

Eagle32

@Eagle32
About
Posts
43
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 404 returned when attempting to access service metadata
    E Eagle32

    I have a web service(using wsHttpBinding and SSL) developed in Visual Studio 2017. Whenever i introduce the following line, the Web Service just fails and it goes into the "faulted" state.

    The error message when attempting to "Add Service Reference" on the client side i recieve the following error: "There was an error downloading 'https://localhost/FootballService/service'. The request failed with HTTP status 404: Not Found. Metadata contains a reference that cannot be resolved: 'https://localhost/FootballService/service'. There was no endpoint listening at https://localhost/FootballService/service that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote server returned an error: (404) Not Found. If the service is defined in the current solution, try building the solution and adding the service reference again. Here is the code relating to the validator.

    public class AuthenticationCertificateValidator : X509CertificateValidator
    {
    string allowedIssuerName;

    public AuthenticationCertificateValidator(string allowedIssuerName)
    {
    if (allowedIssuerName == null)
    {
    throw new ArgumentNullException("allowedIssuerName");
    }

    this.allowedIssuerName = allowedIssuerName;
    

    }

    public override void Validate(X509Certificate2 certificate)
    {
    // Check that there is a certificate.
    if (certificate == null)
    {
    throw new ArgumentNullException("certificate");
    }

    // Check that the certificate issuer matches the configured issuer.
    if (allowedIssuerName != certificate.IssuerName.Name)
    {
        throw new SecurityTokenValidationException
          ("Certificate was not issued by a trusted issuer");
    }
    

    }
    }

    However the service works fine when i only have the "ChainTrust" line enabled as shown below:

    Ideally i want my service and client to use ChainTrust and also use the custom validator class if that's possible? Therefore what am i doing wrong regarding configuration? Am i missing something from the config file? Here is the full Service config:

    WCF and WF csharp visual-studio wcf sysadmin security

  • Using a WSDL provided by a third party in C# project
    E Eagle32

    Yes thats right. Sorry i didn't make it clear. What's the correct way of importing the WSDL into the C# project? Is it using Web Reference or Service Reference?

    C# question csharp wcf tutorial

  • Using a WSDL provided by a third party in C# project
    E Eagle32

    Hi, I have a WSDL provided by a third party supplier that i would like to use in my C# code however currently i'm struggling to find a way to use the WSDL. I looked at their example and they're using ASMX file in the C# project in order to invoke the methods exposed by the service. If i wanted to use methods available in the WSDL in the C# project, how do i import the WSDL into the project?

    C# question csharp wcf tutorial

  • Are there any limitations to Microsoft Word Doc conversion to HTML?
    E Eagle32

    Hi there, (Not sure which area to put this question in so forgive me)I have a word document but i'd like to convert it to HTML. I know i can convert from Microsoft Word to HTML document but are there any limitations or issues? if so what do i need to be aware of? Can anyone suggest any suitable alternatives please?

    .NET (Core and Framework) question html

  • How to adapt when taking over project
    E Eagle32

    Richard, Thanks for the insight i will sure apply the approach you stated.

    Work Issues business collaboration tutorial lounge learning

  • How to adapt when taking over project
    E Eagle32

    Hi there, I am sure professionals in the Software Development community have come across this scenario in their careers. I am about to be assigned to work on an existing project that my team mate worked on. However he is being moved to work on another project. One of my team members who worked on this project has left. So as you can see there is only one person left on how this piece of software is suppose to work. I am overwhelmed/nervous because my knowledge on the project is very limited and the deadline for this is short. This individual has knowledge on the technical aspects of the project and the business requirements/process. He has 20 years experience in software development. We have a tester assigned to the project but the tester only has knowledge about the business requirements not the nitty-gritty stuff. I appreciate if someone can provide me with advice/general tips on how to become better at adapting to new projects, learning about the project and implementing features, fixing bugs, what to do, what not to do.

    Work Issues business collaboration tutorial lounge learning

  • Dictionary collection support in ODP.NET
    E Eagle32

    Thanks for your input. I will check those links out. Ultimately what I am trying to achieve is to improve the performance of the application I am working on. Currently I do a database call for each entity. This works but from a performance aspect it isn't good hence why I decided to ask the dev community.

    C# csharp database question oracle visual-studio

  • Dictionary collection support in ODP.NET
    E Eagle32

    Hi there, I use Oracle 11gR2 database. I am developing in Visual Studio 2013 with C# and using ODP.NET. Question 1 Does ODP.NET support Dictionary collection? I couldn't seem to find the necessary information so i was wondering if someone could explain if this is possible please? Question 2 Secondly I have the following collection:

    Dictionary> myDict = new Dictionary>();

    My intention is to send this collection to my stored procedure and perform a Bulk insert of this data. If it is possible how can I go about doing this? Can someone provide me with example in PL/SQL and C# please? Kind Regards,

    C# csharp database question oracle visual-studio

  • Automapping properties assistance required
    E Eagle32

    I am using Automapper. Can you assist please? Thanks.

    C# csharp database xml question workspace

  • Automapping properties assistance required
    E Eagle32

    I am currently working with a DB table and I need to map extra properties from DAO to BE class. I have to produce XML like the following:

    234OI456
    The Zoo

    3456 Kramer

    92345-8922
    Cobra

    The extra columns in the db view are like so: ANI_TYPE VARCHAR(20) ANI_VALUE VARCHAR(20) Previously when I didn't have the extra columns I mapped the values like this for each Zoo

    Mapper.CreateMap()
    .ForMember(d => d.ZooId, e => e.ZOO_ID))
    .ForMember(d => d.Name, e => e.ZOO_NAME))
    .ForMember(d => d.Address, e => e.ZOO_ADDRESS))
    .ForMember(d => d.ZipCode, e => e.ZOO_ZIPCODE));

    How would I go about mapping these 2 columns(ANI_TYPE, ANI_VALUE) so i can create the structure shown in the xml in regards to Animals? I have a c# class for Animal type which has the following

    public enum AnimalType
    {
    INVALID,
    REPTILE,
    MAMMAL,
    INSECT
    }

    My C# class for the Animal looks like this but i guess it will require rework. Feel free to provide suggestions/examples: Currently this is what my classes look like:

    //BE class
    public class Zoo
    {
    public int ZooId {get; set;}
    public string Name { get; set; }
    public string Address {get; set; }
    public string ZipCode {get; set;}
    public List Animals {get; set;}
    }

    This is my current setup for Animal entity

    //BE Class
    public class Animal
    {
    public string Type {get; set;}
    public string Text { get; set; }
    }

    I appreciate if someone can assist me with the above. Thanks,

    C# csharp database xml question workspace

  • Display Images dynamically at runtime from a web site
    E Eagle32

    Hi, Yes your right, i only need to specify the OriginalString part. I solved the problem by using the debugger after i replied to your previous message. When i was developing a Windows Form application I was using HTTpRequests etc and assigning the values to a picture box. Thanks for the help.

    ASP.NET csharp asp-net dotnet com sysadmin

  • Display Images dynamically at runtime from a web site
    E Eagle32

    I am using control and I am setting the image URL to the web address like this:

    String webURL = System.Net.HttpWebRequest.Create(Title.ImageUri.OriginalString).GetResponse().GetResponseStream().ToString()
    Image1.ImageURL = webURL;

    if i view the source then the src is set to this which is wrong:

    img id="ctl00_ContentPlaceHolder1_Image1" src="System.Net.ConnectStream" alt="DVD" style="height:122px;width:122px;border-width:0px;margin-left: 73px" />

    Any advice on the above? Thanks,

    ASP.NET csharp asp-net dotnet com sysadmin

  • Display Images dynamically at runtime from a web site
    E Eagle32

    Hi, I have search facility on my web site. I am using .NET framework 3.5 with ASP.NET C# and I would like to display an image on the page. The image i am retrieving is directly from a web site e.g http://somewebsite.com/images/image1.jpg I am trying to use the control and tried to set the Image URL to the web address but it doesnt work. I know how to display the image from a web server when using Windows Form by using system.Net and using http requests but i dont know how to go about implementing this in web site. I would appreciate if somebody could assist me with this? Thanks,

    ASP.NET csharp asp-net dotnet com sysadmin

  • Count number of records from a tabel and display result in a gridview column at run time.
    E Eagle32

    Can you provide me an example please if you dont mind? Thanks,

    ASP.NET csharp asp-net tutorial question

  • Problem with declaring namespace
    E Eagle32

    Hi, I am trying to use an External Web Service in my Web Site application i am developing. The problem occurs when declaring the namespace such as this: using namespace.classname Error: The type or namespace cannot be found. Does this mean i have to put the C# class file into App_Code folder? I was wondering if somebody could help me please in terms of replicating the problem i am facing? I am trying to use the following web service: IMDB Web Service I have followed the instructions but it still doesnt work. I have even copied the following code from the generated output file which you will see when you access the above URL into my global WebConfig file and it still doesnt work. I am using .NET Framework 3.5 and VS 2008. Thanks & Regards,

    ASP.NET help csharp dotnet visual-studio com

  • Count number of records from a tabel and display result in a gridview column at run time.
    E Eagle32

    Hi I am using a gridview to display data from my table at runtime. I am new to ASP.NET. I am not using boundfields but I am using Template fields. I specify the HeaderText and DataKeys I am using a web service to provide me a DataSet of the chosen table and bind it to the GridView in page_load event. I would like to count the number of records from a chosen table and display that in the Gridview. I have written a method to return number of records by passing in a string parameter product name but i am not sure of how to invoke the method so the value is shown in the GridView. How could i go about doing this? Do i need to invoke the method using Eval like this:

    <asp:TemplateField HeaderText="ProductName" SortExpression="ProductName">
    <ItemTemplate>
    <%#GetRowCount(Eval(ProductName))%>
    </ItemTemplate>
    </asp:TemplateField>

    Would the above work? Thanks,

    ASP.NET csharp asp-net tutorial question

  • Database Error when retrieving specific records from a table
    E Eagle32

    Hi, I am trying to retrieve specific records from a table by specifying the parameter value at run time but the following error keeps occuring when i pass in a value of the correct data type. System.Data.OleDb.OleDbException: No value given for one or more required parameters. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) at Service.RetrieveComments(Int32 ThreadID) As you can tell from the error message I am using Microsoft Access database provider. The data type for ThreadID is 'Number' and the field size is set to 'long integer'. The field does exist in the table. In my code I even tried changing datatype from 'int' to 'uint64' but that didnt solve the problem. Here is the code I had developed. [WebMethod] public DataSet RetrieveComments(int ThreadID) { String queryString = "SELECT * FROM [Comments] WHERE" + "([ThreadID]=@ThreadID)"; DataSet dataSet = new DataSet(); String connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|/MyDatabase.mdb;Persist Security Info=True"; OleDbConnection dbConn = new OleDbConnection(connString); OleDbDataAdapter dbAdapter = new OleDbDataAdapter(queryString, dbConn); dbConn.Open() dbAdapter.Fill(dataSet, "Comments"); dbConn.Close(); return dataSet; } Is there anything wrong with the above code? I have tried the above SQL query in MS Access and it runs fine providing I remove the

    ASP.NET database help security question

  • Sending emoticons between 2 applications
    E Eagle32

    Hi, I am creating a TCP Chat application using Asynchronous method calls and I have created 2 applications, one of which is a mobile app that runs on a PDA and the other on a desktop pc. At the moment i can send text back and forth but i would like to send emoticons too. I am using a richtextbox, how could i go about doing this? I would appreciate your thoughts and advice. Thanks,

    ASP.NET mobile question discussion lounge

  • Creating a forum in ASP.NET
    E Eagle32

    Hi, I am trying to create a basic forum in ASP.NET.I would like assistance in regards how i could go about designing a forum from a GUI point of view. How would i go about desiging the forum based on the following tables? I have a 3 tables Members ID Name Username Password Threads ThreadID ThreadTitle ThreadSubject Comments CommentsID ThreadID MemberID Comment The members ID is linked to the members ID in Threads table The thread ID is then linked to a thread ID in the Comments table The member ID is then linked to the member ID in the Comments table. I am using a DataGridView to display the the comments information from the comments table Is it neccessary to have a Comments table and keep the actual comments seperate in regards to design? Should i also put the thread title and username in the comments table? How could i go about designing the forum from "GUI" point of view? I would appreciate if anybody could advise please? Thanks,

    ASP.NET csharp asp-net design question

  • Print images with the correct size
    E Eagle32

    Hi, Thanks for replying. How would i go about doing this? Would this work? PrintDocument document = new PrintDocument(); document.PrinterSettings.DefaultPageSettings.PrinterResolution.X = 300; document.PrinterSettings.DefaultPageSettings.PrinterResolution.Y = 300; Thanks,

    C# graphics help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups