Yes you can definitely build this, but one reality upfront: whichever LLM service you use, token consumption is unavoidable. Moving away from Copilot Studio just shifts the cost to your own subscription, you gain architectural control but not free compute.
Technically you implement standard RAG flow, crawl your HTML pages and strip markup, extract text from filesystem and SQL PDFs using server-side library, chunk everything and push to a search layer. That search can be full-text like Azure Cognitive Search or embedding-based vector search. When user asks a question your MVC endpoint queries search for relevant chunks, sends them as context to LLM with a prompt like "answer only using this, say you don't know if not there", then shows the model response in chat bubble.
If your main concern is cost, you have two directions. One is to still use an LLM but wrap it in tight limits: per-user daily message caps, IP-based rate limiting, caching for repeated questions, etc., so token usage stays under control. The other is to skip AI entirely: just do full-text search over your HTML/PDF content, show the best matches, maybe format the text in a “bot-like” way, but don’t call any model at all, so there are no credits being burned.