locked
Can I use Visual Studio C# to build web API with similar feature? RRS feed

  • Question

  • https://www.seethroughny.net/payrolls

    Take above website for example, the left navigation panel allows users to filter data based on field name.

    I would like to build something with similar feature(displaying database information to general public), is it possible to get it done by Visual Studio?

    I have some programming experience, but not a professional app developer. I have some experience on window application development, but totally new to web application development.

    Not sure how to describe my questions:

    1. First, is it possible to use Visual Studio to build something similar, no need to be fancy, as long as it is functional. 
    2. If I build a web application in Visual Studio, how can I publish the Visual Studio application under www.myorganization.com/mysampleproject , or something like that, just making sure that it is under the domain www.myorganization.com
    3. How can it guaranteed general public can view the data? Is there database setting? As an employee, I need username and password to run query from the database. If I build a web application, how to guaranteed general public can view the data without username/ password?

    So, in order to accomplish such a project(displaying database information to general public), where should I begin with? What skill set do I need to learn? 

    Thank you very much!





    • Edited by VA_er Wednesday, June 17, 2020 11:48 PM
    Wednesday, June 17, 2020 11:42 PM

Answers

  • How can it guaranteed general public can view the data? Is there database setting? As an employee, I need username and password to run query from the database. If I build a web application, how to guaranteed general public can view the data without username/ password?

    Responding your question 3:

    The database credentials are embedded within your web application, i.e., within the server-side code that executes in your server and sends web pages to the general public. This allows your server-side "engine" to query the database, and once it has the data, it builds an HTML page that is returned to the browser of the user, where the user sees the data without ever opening a connection to the database from his or her side. All the connections are open from the server side.

    The standard way to store the database credentials consists in embedding them in a connection string that is saved to the web.config configuration file. You can do this manually, but if you are using any of the built-in tools from Visual Studio to build your data access code, then these tools will automatically save the connection string to the config file for you.

    • Marked as answer by VA_er Thursday, June 18, 2020 7:10 PM
    Thursday, June 18, 2020 7:01 PM

All replies

  • Beings you are new to web development you need to (and yes it's possible in Visual Studio using ASP.NET projects)

    • Learn CSS and responsive design which the site you posted using BootStrap 3x while BootStrap 4 is easier. Responsive design should be important so not just desktop browsers can view a site. 
    • Publishing to the public requires you to purchase a domain (one example) and hosting your database. You can setup user names/passwords via admin pages.
    • Meta tags on you site can help people get to it.
    • A short and memorable name for your site helps people get to it.

    Start here https://forums.asp.net/


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, June 18, 2020 1:59 AM
  • How can it guaranteed general public can view the data? Is there database setting? As an employee, I need username and password to run query from the database. If I build a web application, how to guaranteed general public can view the data without username/ password?

    Responding your question 3:

    The database credentials are embedded within your web application, i.e., within the server-side code that executes in your server and sends web pages to the general public. This allows your server-side "engine" to query the database, and once it has the data, it builds an HTML page that is returned to the browser of the user, where the user sees the data without ever opening a connection to the database from his or her side. All the connections are open from the server side.

    The standard way to store the database credentials consists in embedding them in a connection string that is saved to the web.config configuration file. You can do this manually, but if you are using any of the built-in tools from Visual Studio to build your data access code, then these tools will automatically save the connection string to the config file for you.

    • Marked as answer by VA_er Thursday, June 18, 2020 7:10 PM
    Thursday, June 18, 2020 7:01 PM