Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am looking at the possibilities when it comes to making a trigger on a SQL server, trigger a function on my website (without having to poll it every x minutes).
The reason being, I am attempting to create a caching service for my SQL data to where it will only update the cache when there are changes to the table it is setup for. The idea would be that items which are in the database, rarely changed and used often enough to want to skip the expensive trip to the database.
any ideas would be great, thanks.
SQL Server supports event notifications for just this type of problem.
http://msdn.microsoft.com/en-us/library/ms190427(v=sql.105).aspx
If it's data that you want to put in the application cache then you could consider using the SqlCacheDependency class (http://msdn.microsoft.com/en-us/library/ms178604(v=vs.100).aspx). This will expire the cache when there is a predefined change in the database thus avoiding the need for any kind of polling.
Of course it depends what your exact problem is to whether this will meet your needs
SQL Server has CLR integration (albeit at last check, only with .NET 2.0). This means you can run some assembly marked as such from a function/stored-procedure/query. Here is the documentation:
MSDN SQL Server CLR description
You can write an assembly with an exposed method for SQL Server and run it directly from there, thus completing your loop in C#/VB/.NET language of your choosing. This may be a little heavy handed if none of the above answers have what you're looking for, but I'm pretty sure offers the most flexible approach where you control everything.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am developing web api(s) for an android app client. Now the developer of the client, wants a way to test web api(s) without getting the real data corrupt. So now I am thinking of something like unit testing and database (ef core) mocking in that except the requests are remote and stateless; so every time the client app requests for data or changing it, the database should remember the last things.
From the docs of Microsoft, there are two ways to do this on unit testing:
SQLite in-memory mode
The InMemory provider
But the thing is that those are volatile and from one request to another request they will be refreshed. So I think SQLite (normal mode - file mode), or using SQLServer with different connection string will be a good solution. Now there are some questions:
Is this a good idea or there is one better?
If it is good, then how should I implement it?
Is it good to add a header in the request?
On the server-side code where should I tell the ef to use testing database?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Apologies if this is in the wrong category. I'm currently developing and application in ASP, due to my inexperience with ASP I'm worried about vulnerabilities that a user can exploit.
My application is being coded from scratch, no templates used or defaults from Visual Studio, completely blank projects. The user is greeted with a login page where depending on there user access in active directory depends on which pages the user can access.
The exploit I'm worried about is if the user will be able to commit a directory traversal and access a page in which they're not allowed to access and change critical information.
I'm afraid my inexperience has caught up with me. Could someone explain to me how I could limit the access to the user or, If I'm over thinking the process, correct me? Constructive criticism is accepted.
Microsoft does try to help protect your application through their defaults, so if you're running in IIS, make sure the user the application pool is running under only has write access to the folders it needs to write into.
This is a very open-ended question and depends on many factors such as version of .net, server OS/IIS version, other handlers installed, etc. But a good start is to review the OWASP Top 10:
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project#OWASP_Top_10_for_2013
Here's a list of some automated tools you can use for testing your implementation:
https://geekflare.com/online-scan-website-security-vulnerabilities/
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
If we have an ASP MVC4 web application and we have to provide it to multiple companies with their logins, what should be the best way with respect to database architecture.
Should we make separate dbs for each company and on url bases we will connect with respective database?
Or should we make one db and use a key for each company?
Because each company will be using the same web application but with its own records.
I am still confused about it because if we make separate dbs for like 100 companies and we need to change a column or cell of db or we want to do updates in our software we will have to change it in 100 dbs. So is there some way Microsoft provides for SQL Server 2008R2.
Thanks for help in advance.
As shown my practice, often different companies wants different functionality or additional features for some parts of web-application. So better will be to separate not only db but web app also.
Also question is it intranet or internet solution? If intranet - no questions. If internet -use third level domain name and separate db for each company. It will give you more flexibility.
This is not as simple to answer as it sounds as it depends upon exactly what you are doing.
Microsoft have quite a good paper on this which I strongly recommend you read before you start. http://msdn.microsoft.com/en-us/library/aa479086.aspx
At our firm we use one database for each client and a main database to keep track of which databases we have and what server they are on. We also have a couple of other databases for aggrigated reporting and keeping track of background processes. We only have one web site accessing those databases which works well for us.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I need to create my own application that is similar windows performance monitor. I want to monitor the DQL using asp.net. But i don't know where to start. I already research but no luck.
Consider using below components (but still remember, it is only a suggestion) to start from:
System.Diagnostics.PerformanceCounter class - to access performance counter data
ASP.NET MVC - to create a website
SignalR - to create a backend Hub for client notifications of data gathered by PerformanceCounter class
DotNet.Highcharts - to create charts control
What is your planned usage of this application? If you are planning to use it for your organization then you might want to consider SaaS solution that allows you to plug in your collector.
You have better uptime on the monitoring application because that monitoring service is the last thing you want to go down. You are probably more familiar with how to monitor DQL than to create an application that does charting and alerting. You should be able to get something going within days instead of weeks.
Monitoring is normally composed of collecting, storing and charting. A good SaaS monitoring tool will do well with storing and charting and you need to look for ones with plugin framework that allow you to decide what to collect.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to develop an ERP system, but I want it to run on a web browser. I want it to store data in an SQLite database, but I don't want it to have to work as client/server, just local.
I also want to have access to environment variables and the filesystem. Ultimately I want to manipulate the DOM using C instead of JavaScript.
Is there a browser, framework or library for this?
As far as I know, it's impossible to manipulate the DOM with any language other than JavaScript - since that is the only programming language which the browser will run.
I would try to think of one of the following:
1) Run a local web server - why shouldn't you? I am not sure about C, but Python, Ruby, JS and many other languages make these extremely simple to set up.
2) Just write a GUI application, if you are really opposed to having another program running in the network.
3) If you're not opposed to Python (instead of C), you can try out Pyjamas - a framework which allows you to code a web-app in Python, and use it as a desktop app later (without running the server). The non-server version won't actually run inside a browser though (AFAIK - I've never tried it myself).